summaryrefslogtreecommitdiff
path: root/tag.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-05 00:03:09 (GMT)
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-05 00:03:09 (GMT)
commit770896e548d0e68ab120507895e1e878c5ee347c (patch)
tree789eaf8c1ac87a1d7115b0a47d1300ba191cff1d /tag.c
parent552e2bd12ee7b3a73345f64cf66b2ce67d9d98dd (diff)
downloadgit-770896e548d0e68ab120507895e1e878c5ee347c.zip
git-770896e548d0e68ab120507895e1e878c5ee347c.tar.gz
git-770896e548d0e68ab120507895e1e878c5ee347c.tar.bz2
Teach fsck-cache to accept non-commits for reachability analysis.
In particular, teach it about tags. Also, to make reachability actually work for tags, we need to add the ref to the tagged object.
Diffstat (limited to 'tag.c')
-rw-r--r--tag.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tag.c b/tag.c
index 9eade75..3a71dd4 100644
--- a/tag.c
+++ b/tag.c
@@ -49,6 +49,8 @@ int parse_tag(struct tag *item)
goto err;
item->tagged = parse_object(object);
+ if (item->tagged)
+ add_ref(&item->object, item->tagged);
type_line = data + 48;
if (memcmp("\ntype ", type_line-1, 6))