Thread (35 messages) flat view 35 messages, 8 authors, 2016-06-15

Re: [PATCH v2] checkout: implement "-" shortcut name for last branch

From: Johannes Sixt <hidden>
Date: 2016-06-15 22:45:57

Thomas Rast schrieb:
Let git-checkout save the old branch as a symref in LAST_HEAD, and
make 'git checkout -' switch back to LAST_HEAD, like 'cd -' does in
the shell.
/me likes this feature.

git rebase (-i or not) calls checkout behind the scenes if the
two-argument form is used:

   git rebase [-i] master topic

and 'topic' is not the current branch. You may want to add a test that
ensures that rebase sets LAST_HEAD in this case.

You must make sure that commits referenced by LAST_HEAD are not
garbage-collected. (I don't know if this happens anyway for symrefs in .git.)

-- Hannes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help