Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] Add function to checkout a branch in git.el

From: Sergei Organov <hidden>
Date: 2016-06-15 22:44:13

[off-list ref] 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).
- 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?
quoted hunk
 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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help