From 151ae0a8a399dc9cb0881723beeae990edb7defb Mon Sep 17 00:00:00 2001 From: Marius Vollmer Date: Thu, 21 Aug 2008 00:18:04 +0300 Subject: [PATCH] Redone key bindings for pulling, leaving 'U' free for unstage-all. --- NEWS | 7 ++----- magit.el | 9 +++++++-- magit.texi | 17 ++++++++++------- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/NEWS b/NEWS index 6853f0bd..6551f997 100644 --- a/NEWS +++ b/NEWS @@ -2,11 +2,8 @@ Changes in magit 0.6: * Magit works with Git 1.6.0 now. (John Wiegley) -* Key bindings and command behavior for diffing, history listing, and - resetting have changed. Please see the manual. - -* Some key bindings have been added for moving around in the status - buffer. +* Many key bindings and the behavior of many commands have changed. + Please see the manual. * All buffers created by Magit are now in magit-mode and share all key bindings. diff --git a/magit.el b/magit.el index 3d1c8679..1faa4e0f 100644 --- a/magit.el +++ b/magit.el @@ -445,8 +445,9 @@ Many Magit faces inherit from this one by default." (define-key map (kbd "m") 'magit-manual-merge) (define-key map (kbd "M") 'magit-automatic-merge) (define-key map (kbd "R") 'magit-rebase-step) - (define-key map (kbd "U") 'magit-pull) (define-key map (kbd "P") 'magit-push) + (define-key map (kbd "f") 'magit-remote-update) + (define-key map (kbd "F") 'magit-pull) (define-key map (kbd "c") 'magit-log-edit) (define-key map (kbd "C") 'magit-add-log) (define-key map (kbd "$") 'magit-display-process) @@ -808,7 +809,11 @@ Please see the manual for a complete description of Magit. (if (yes-or-no-p "Discard all uncommitted changes? ") (magit-run "git" "reset" "--hard"))) -;;; Push and pull +;;; Updating, pull, and push + +(defun magit-remote-update () + (interactive) + (magit-run "git" "remote" "update")) (defun magit-pull () (interactive) diff --git a/magit.texi b/magit.texi index a2a22fac..bc188040 100644 --- a/magit.texi +++ b/magit.texi @@ -283,10 +283,12 @@ Such a rebase can be finished with @kbd{R} as well. @node Pushing and Pulling @chapter Pushing and Pulling -Magit will run @code{git pull} when you type @kbd{U} in the status -buffer, and it will run @code{git push} when you type @kbd{P}. You -can type @kbd{$} to pop up a buffer with the transcript of running -these commands. +Magit will run @code{git push} when you type @kbd{P}. You can type +@kbd{$} to pop up a buffer with the transcript of running these +commands. + +Typing @kbd{f} will run @code{git remote update} and @kbd{F} will run +@code{git pull}. That's almost all the support for remote repositories that Magit offers. You should have setup your Git configuration to do the right @@ -298,9 +300,10 @@ branch (by setting the Git config option status buffer header. In this case, the status buffer will also have a @emph{Unpushed -commits} section that shows the commits on you current head that are +commits} section that shows the commits on yourcurrent head that are not in the branch named @code{/}. This section works -much like the history buffer: you can see details about a commit with -@kbd{RET}, and compare two of them with @kbd{.} and @kbd{=}. +just like the history buffer: you can see details about a commit with +@kbd{RET}, and compare two of them with @kbd{.} and @kbd{=}, and you +can reset your current head to one of them with @kbd{x}, for example. @bye