Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2013-12-17 08:28:21 +0400
committerJunio C Hamano <gitster@pobox.com>2013-12-21 02:37:03 +0400
commit5e1361ccdbfaf328b5bae1eae29f16ba965c54b1 (patch)
treea37451fd4b7cd022c1c14b6d0bf8203789e65fb2 /log-tree.c
parent2f93541d88fadd1ff5307d81c2c8921ee3eea058 (diff)
log: properly handle decorations with chained tags
git log did not correctly handle decorations when a tag object referenced another tag object that was no longer a ref, such as when the second tag was deleted. The commit would not be decorated correctly because parse_object had not been called on the second tag and therefore its tagged field had not been filled in, resulting in none of the tags being associated with the relevant commit. Call parse_object to fill in this field if it is absent so that the chain of tags can be dereferenced and the commit can be properly decorated. Include tests as well to prevent future regressions. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'log-tree.c')
-rw-r--r--log-tree.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/log-tree.c b/log-tree.c
index 8534d91826..1982631ca4 100644
--- a/log-tree.c
+++ b/log-tree.c
@@ -134,6 +134,8 @@ static int add_ref_decoration(const char *refname, const unsigned char *sha1, in
obj = ((struct tag *)obj)->tagged;
if (!obj)
break;
+ if (!obj->parsed)
+ parse_object(obj->sha1);
add_name_decoration(DECORATION_REF_TAG, refname, obj);
}
return 0;