Re: [PATCH] Add function to checkout a branch in git.el
- From
- Sergei Organov <osv@javad.com>
- Date
- Feb 13, 2008, 18:29 UTC
- Message-ID
- <87y79ovhfi.fsf@osv.gnss.ru>
- In-Reply-To
- <87wsp8u9m7.dlv@maison.homelinux.org>
<vanicat@debian.org> writes:
> One can now: > - checkout an existing branch with M-x git-change-branch > - create and checkout a new branch with C-u M-x git-change-branch
s/git-change-branch/git-checkout/? I mean is there any reason it is called differently from GIT's "git checkout"?
Besides, I also think that prefix is not a good idea for this kind of stuff (see my other reply in this thread).
Show 6 quoted lines
> - do all this from the Git menu > --- > It could also be interesting to add some key biding for those > > Also one might want to update the *git-status* buffer after checkout, > but this is not done by this patch
Why? Isn't it as simple as calling (git-refresh-status) at the end of git-change-branch?
Show 13 quoted lines
> contrib/emacs/git.el | 45 +++++++++++++++++++++++++++++++++++++++++++++ > 1 files changed, 45 insertions(+), 0 deletions(-) > > diff --git a/contrib/emacs/git.el b/contrib/emacs/git.el > index a8bf0ef..404c8e6 100644 > --- a/contrib/emacs/git.el > +++ b/contrib/emacs/git.el > @@ -1138,6 +1138,50 @@ Return the list of files that haven't been handled." > (when (eq (window-buffer) (current-buffer)) > (shrink-window-if-larger-than-buffer))) > > +(defun git-list-branch () > + "Return a list of available branch"
s/branch/branches/
> + ;; should I check if I'm in a git repository ? > + (let ((branchs ()))
s/branchs/branches/
-- Sergei.