Re: [PATCH 2/3] DWIM "git checkout frotz" to "git checkout -b frotz origin/frotz"
- From
Björn Steinbrink <b.steinbrink@gmx.de>
- Date
- Oct 19, 2009, 05:58 UTC
- Message-ID
- <20091019055811.GA7779@atjola.homenet>
- In-Reply-To
- <20091019052043.6117@nanako3.lavabit.com>
On 2009.10.19 05:20:43 +0900, Nanako Shiraishi wrote:
Show 5 quoted lines
> A user who always wants tracking can set the config option and use > the new "git checkout frotz" shortcut, but a user who usually > doesn't want tracking doesn't have the config option and when he > wants tracking only for this new branch he can explicitly say "git > checkout -t origin/frotz", right?
Well, branch.autosetupmerge has three possible values. - true: Do the upstream setup when starting from remote tracking branches - always: Also do the upstream setup when starting from a local branch head - false: Don't do any upstream setup
The default is "true", which should catch the "git checkout frotz" shortcut, as that selects a remote tracking branch as the starting point. So the user doesn't have to change any config setting to have that act as if -t was given.
Only if we doesn't want "git checkout frotz" to not do the upstream setup, he needs to set branch.autosetupmerge to false.
And falling back to "git checkout --track/--no-track origin/frotz" he can override whatever config setting he has.
Björn