From: Björn Steinbrink Date: Sun, 18 Oct 2009 12:00:53 GMT Subject: Re: [PATCH 2/3] DWIM "git checkout frotz" to "git checkout -b frotz origin/frotz" Message-ID: <20091018120053.GA11391@atjola.homenet> In-Reply-To: <20091018193448.6117@nanako3.lavabit.com> On 2009.10.18 19:34:48 +0900, Nanako Shiraishi wrote: > Quoting Junio C Hamano > > > When 'frotz' is not a valid object name nor a tracked filename, > > we used to complain and failed this command. When there is only > > one remote that has 'frotz' as one of its tracking branches, we can > > DWIM it as a request to create a local branch 'frotz' forking from > > the matching remote tracking branch. > > In the subject you used 'git checkout -b frotz origin/frotz'. Did you > forget to say '-t'? Hm, the DWIMmery only triggers when opts.track is BRANCH_TRACK_UNSPECIFIED, i.e. -t was not used. And it doesn't change opts.track when it DWIMs, so it respects branch.autosetupmerge, which would be overriden by -t. So it seems correct that -t is not in there. Björn