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

Re: [PATCH] commit: do not switch branch during a rebase unless -f is given

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:49:38

Nguyễn Thái Ngọc Duy  [off-list ref] writes:
It does not make much sense to switch branch when you are in a middle
of a rebase. Sometimes you might want to switch away for a moment then
back with "git checkout - ". But I find myself so many times switching
away then forget that I was rebasing something.

Avoid doing that by default. Users can use -f if they really want to.

Signed-off-by: Nguyễn Thái Ngọc Duy <redacted>
I think you need to retitle the patch.

You should realize that overloading "-f" and conflating its totally
different meaning, which is to discard local changes, with this new usage
to say "override the 'you are in rebase' switch" closes the door to future
improvements we could make to rebase so that it does not to require a
totally clean working tree.  It would be Ok with today's rebase, as you
wouldn't have local changes when it runs, but we might regret this 9
months down the road.
 I know there are other commands like rebase ("git am" comes to mind)
 but I don't use those. Feel free to put some more on top if somebody
 finds it a good thing to do.
If you envision something similar to be used during "git am", then you
really shouldn't be reusing "-f", as "git am" is designed to be usable in
a dirty working tree.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help