Merge branch 'nd/checkout-disambiguation' into maint
commitd336b675680c7d4adc9f7190b7974b2ef10c0af4
authorJunio C Hamano <gitster@pobox.com>
Thu, 29 Sep 2016 23:49:43 +0000 (29 16:49 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 29 Sep 2016 23:49:44 +0000 (29 16:49 -0700)
treef27b45c24a78fecac73f6bf5407d9450052ab8aa
parent710658413712fd4c4abe539d4788aa954a36734a
parentb829b9439adc12fa4fb33338694e7f1ad40254c1
Merge branch 'nd/checkout-disambiguation' into maint

"git checkout <word>" does not follow the usual disambiguation
rules when the <word> can be both a rev and a path, to allow
checking out a branch 'foo' in a project that happens to have a
file 'foo' in the working tree without having to disambiguate.
This was poorly documented and the check was incorrect when the
command was run from a subdirectory.

* nd/checkout-disambiguation:
  checkout: fix ambiguity check in subdir
  checkout.txt: document a common case that ignores ambiguation rules
  checkout: add some spaces between code and comment
builtin/checkout.c