author | Junio C Hamano <junkio@cox.net> | |
Mon, 11 Jul 2005 06:55:56 +0000 (23:55 -0700) | ||
committer | Linus Torvalds <torvalds@g5.osdl.org> | |
Mon, 11 Jul 2005 17:13:09 +0000 (10:13 -0700) | ||
commit | 013aab8265a806c8d3c9b040485839091bca30f4 | |
tree | e75e5d1030d60d7dfbde5c7f29132a92ec965836 | tree | snapshot |
parent | a3eb250f996bf5e12376ec88622c4ccaabf20ea8 | commit | diff |
[PATCH] Dereference tag repeatedly until we get a non-tag.
When we allow a tag object in place of a commit object, we only
dereferenced the given tag once, which causes a tag that points at a tag
that points at a commit to be rejected. Instead, dereference tag
repeatedly until we get a non-tag.
This patch makes change to two functions:
- commit.c::lookup_commit_reference() is used by merge-base,
rev-tree and rev-parse to convert user supplied SHA1 to that of
a commit.
- rev-list uses its own get_commit_reference() to do the same.
Dereferencing tags this way helps both of these uses.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
When we allow a tag object in place of a commit object, we only
dereferenced the given tag once, which causes a tag that points at a tag
that points at a commit to be rejected. Instead, dereference tag
repeatedly until we get a non-tag.
This patch makes change to two functions:
- commit.c::lookup_commit_reference() is used by merge-base,
rev-tree and rev-parse to convert user supplied SHA1 to that of
a commit.
- rev-list uses its own get_commit_reference() to do the same.
Dereferencing tags this way helps both of these uses.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
commit.c | diff | blob | history | |
rev-list.c | diff | blob | history |