Re: [PATCH RFC] rebase: add --revisions flag
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 9, 2009, 19:46 UTC
- Message-ID
- <7v1vj4orra.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20091209130653.GA30218@atjola.homenet>
Björn Steinbrink <B.Steinbrink@gmx.de> writes:
Show 5 quoted lines
> "merge --squash" is one of the things I really dislike, because it turns > off the "history" part of the merge. You can say "Merging in git is about > histories, merging in svn is about changes only" to describe the major > difference for the merge commands in the two systems... "But then > there's --squash which turns git into svn".
I agree with this to some degree, but I do not offhand think of a better alternative.
At the first sight, it looks as if what "merge --squash" does was implemented as a new option "--squash" to the "merge" command merely because the way _how_ it internally needs to compute the result was already available in the implementation of "merge" command, and not necessarily because _what_ it does was conceptually consistent with the way "merge" works.
But at the conceptual level, "merge --squash" is a short-hand for this command sequence:
git rebase -i HEAD that-branch
... make everything except the first one into "squash"
git checkout - ;# come back to the original branch
git merge that-branch ;# fast forward to itSo after all, it is "merge it after squashing them".