summaryrefslogtreecommitdiff
path: root/tag.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-11-03 15:45:36 -0800
committerJunio C Hamano <junkio@cox.net>2005-11-03 15:45:36 -0800
commit6ddc0964034342519a87fe013781abf31c6db6ad (patch)
tree74cc863556a42d41e2bf8dec45e6fd33ed312228 /tag.c
parent235d521da60e4699e5bd59ac658b5b48bd76ddca (diff)
parent2be8fd085e865097fa0908fe1a94c8edf9cde7f5 (diff)
GIT 0.99.9cv0.99.9c
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'tag.c')
-rw-r--r--tag.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/tag.c b/tag.c
index b1ab75ff01..e574c4b7a4 100644
--- a/tag.c
+++ b/tag.c
@@ -3,10 +3,15 @@
const char *tag_type = "tag";
-struct object *deref_tag(struct object *o)
+struct object *deref_tag(struct object *o, const char *warn, int warnlen)
{
while (o && o->type == tag_type)
o = parse_object(((struct tag *)o)->tagged->sha1);
+ if (!o && warn) {
+ if (!warnlen)
+ warnlen = strlen(warn);
+ error("missing object referenced by '%.*s'", warnlen, warn);
+ }
return o;
}