Staging
v0.5.1
https://github.com/git/git
Revision 5035242c4785bd23c53827a1656b5f97394f724e authored by Junio C Hamano on 08 June 2007, 08:19:13 UTC, committed by Junio C Hamano on 08 June 2007, 08:19:13 UTC
Although it is not advisable, we have always allowed a branch
and a tag to have the same basename (i.e. it is not illegal to
have refs/heads/frotz and refs/tags/frotz at the same time).
When talking about a specific commit, the interpretation of
'frotz' has always been "use tag and then check branch",
although we warn when ambiguities exist.

However "git checkout $name" is defined to (1) first see if it
matches the branch name, and if so switch to that branch; (2)
otherwise it is an instruction to detach HEAD to point at the
commit named by $name.  We did not follow this definition when
$name appeared under both refs/heads/ and refs/tags/ -- we
switched to the branch but read the tree from the tagged commit,
which was utterly bogus.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 23fcdc7
History
Tip revision: 5035242c4785bd23c53827a1656b5f97394f724e authored by Junio C Hamano on 08 June 2007, 08:19:13 UTC
checkout: do not get confused with ambiguous tag/branch names
Tip revision: 5035242
File Mode Size
xdiff.h -rw-r--r-- 2.7 KB
xdiffi.c -rw-r--r-- 14.5 KB
xdiffi.h -rw-r--r-- 1.8 KB
xemit.c -rw-r--r-- 4.8 KB
xemit.h -rw-r--r-- 1.1 KB
xinclude.h -rw-r--r-- 1.2 KB
xmacros.h -rw-r--r-- 1.9 KB
xmerge.c -rw-r--r-- 10.5 KB
xprepare.c -rw-r--r-- 10.7 KB
xprepare.h -rw-r--r-- 1.1 KB
xtypes.h -rw-r--r-- 1.6 KB
xutils.c -rw-r--r-- 7.6 KB
xutils.h -rw-r--r-- 1.7 KB

back to top