Thread (5 messages) flat view 5 messages, 4 authors, 2016-08-11

Re: What's in git.git (stable)

From: Junio C Hamano <hidden>
Date: 2016-08-11 20:41:42

Andy Parkins [off-list ref] writes:
On Thursday 2006 December 14 23:46, Junio C Hamano wrote:
...
quoted
I said "commit -b <newbranch>" and deliberately avoided saying
"commit -b <anybranch>", because I did not want to open another
can of worms while we are discussing so many good things
already, and my head can hold only a handful topics at once.
Absolutely.  I'd agree that only <newbranch> is worth even considering.
Just for the record, I do not necessarily agree.  Committing a
small and obvious change out of context to an existing branch
makes just as much sense.

After all, with the example workflow in my message you responded
to, after running the "commit -b typofix" (which creates a new
branch) to record the first typo fix, I am sure that I would
want to record the second typofix I would find while on my topic
to go to the same typofix branch I previously created.

The 'can of worms' is that switching to an existing branch could
fail with conflicts.  Although "git checkout -m" can help
sometimes, that is not something we would want to do in the
middle of doing something else on a topic.  That's why I do not
think "commit -b <anybranch>" is a good idea.

Allowing the form for only a new branch makes an inconsistency
that is hard to explain to new people, and that is why I am not
in favor of having "commit -b <newbranch>" either.

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