threads / discuss / 15552

git-branch manpage question

Subject: git-branch manpage question

## tl;dr

2 messages between Sep 16, 2008 and Sep 16, 2008.

replies: 1people: 2as markdown or json

Mark Struberg· Sep 16, 2008, 14:46 UTC · lore
Hi!
I think i found an inconsistency in the documentation of the git-branch command:
*snip*
--track::
	.... Set the
	branch.autosetupmerge configuration variable to `false` if you want
	'git-checkout' and 'git-branch' to always behave as if 
	'--no-track' were given...
*snip*
and 
*snip*
--no-track::
	Ignore the branch.autosetupmerge configuration variable.
*snip*
So, the description of branch.autosetupmerge is referencing --no-track and vice versa, thus the effective documentation is essentially missing as far as I understand.

txs and LieGrue, strub

__________________________________________________ Do You Yahoo!? Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails. http://mail.yahoo.com

Michael J Gruber· Sep 16, 2008, 16:25 UTC · re: Mark Struberg · lore

Re: git-branch manpage question

Mark Struberg venit, vidit, dixit 16.09.2008 16:46:
Show 19 quoted lines
> Hi!
> 
> I think i found an inconsistency in the documentation of the
> git-branch command:
> 
> *snip* --track:: .... Set the branch.autosetupmerge configuration
> variable to `false` if you want 'git-checkout' and 'git-branch' to
> always behave as if '--no-track' were given... *snip*
> 
> and
> 
> *snip* --no-track:: Ignore the branch.autosetupmerge configuration
> variable.
> 
> *snip*
> 
> So, the description of branch.autosetupmerge is referencing
> --no-track and vice versa, thus the effective documentation is
> essentially missing as far as I understand.

Well, what's missing is the explanation that "--no-track" is the opposite of "--track". Do we really need to stress that?

The explanation of "--track" is in the "....", you left it out in your quote.

Maybe the formulation is a bit suboptimal because it's squeezed more or less forcibly into the option list concept. At "--track" there is a description of what is meant by a tracking branch configuration. Now, the logical flow is:

If --track is given, set up tracking. If --no-track is given, don't set up tracking. If none is given, check branch.autosetupmerge: If it is false, don't set up tracking. If it is always, set up tracking. If it is unset (or true), check what kind of start point we branch off from: If it is a remote, set up tracking. If it is not a remote, don't set up tracking.

Admittedly, the description at --track is a bit contrived. But if you read the DESCRIPTION section before the options things should become clear. Maybe git-branch(1) should reference git-config(1).

Cheers, Michael

← back to recent threads