Re: [RFC PATCH v3 2/4] branch: re-order function arguments to group related arguments
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 13, 2017, 02:32 UTC
- Message-ID
- <xmqqefp2c3i0.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <1510493270.2683.6.camel@gmail.com>
Kaartic Sivaraam <kaartic.sivaraam@gmail.com> writes:
Show 8 quoted lines
> I've tried to improve it, does the following paragraph sound clear > enough? > > branch: group related arguments of create_branch() > > New arguments were added to create_branch() whenever the need > arised and they were added to tail of the argument list. This > resulted in the related arguments not being close to each other.
OK, I understand what you wanted to say. But I do not think that is based on a true history.
- f9a482e6 ("checkout: suppress tracking message with "-q"",
2012-03-26) adds 'quiet' just after 'clobber_head', exactly
because they are related, and leaves 'track' at the end. - 39bd6f72 ("Allow checkout -B <current-branch> to update the
current branch", 2011-11-26) adds 'clobber_head' not at the end but
before 'track', which is left at the end. - c847f537 ("Detached HEAD (experimental)", 2007-01-01) split 'start'
into 'start_name' and 'start_sha1' (the latter was laster removed)
and this was not a mindless "add at the end", either. - 0746d19a ("git-branch, git-checkout: autosetup for remote branch
tracking", 2007-03-08) did add track at the end, but that is
justifiable, as it has no relation to any other parameter.You could call 39bd6f72 somewhat questionable as 'clobber_head' is related to 'force' more strongly than it is to 'reflog' [*1*], but it is unfair to blame anything else having done a mindless "add at the end".
[Footnote]
*1* I actually think the commit added 'clobber_head' because for the
purpose of what the commit did, it closely was related to 'track',
turning <force, reflog, track> into <force, reflog, clobber, track>.
Arguably, it could have done <force, clobber, track, reflog> instead.