mirror of
https://github.com/git/git.git
synced 2024-10-28 12:59:41 +01:00
blame, line-log: do not loop around deref_tag()
These callers appear to expect that deref_tag() is to peel one layer of a tag, but the function does not work that way; it has its own loop to unwrap tags until an object that is not a tag appears. Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
765428699a
commit
31da121f2d
2 changed files with 3 additions and 6 deletions
|
@ -2400,7 +2400,6 @@ static char *prepare_final(struct scoreboard *sb)
|
|||
struct object *obj = revs->pending.objects[i].item;
|
||||
if (obj->flags & UNINTERESTING)
|
||||
continue;
|
||||
while (obj->type == OBJ_TAG)
|
||||
obj = deref_tag(obj, NULL, 0);
|
||||
if (obj->type != OBJ_COMMIT)
|
||||
die("Non commit %s?", revs->pending.objects[i].name);
|
||||
|
@ -2428,7 +2427,6 @@ static char *prepare_initial(struct scoreboard *sb)
|
|||
struct object *obj = revs->pending.objects[i].item;
|
||||
if (!(obj->flags & UNINTERESTING))
|
||||
continue;
|
||||
while (obj->type == OBJ_TAG)
|
||||
obj = deref_tag(obj, NULL, 0);
|
||||
if (obj->type != OBJ_COMMIT)
|
||||
die("Non commit %s?", revs->pending.objects[i].name);
|
||||
|
|
|
@ -479,7 +479,6 @@ static struct commit *check_single_commit(struct rev_info *revs)
|
|||
struct object *obj = revs->pending.objects[i].item;
|
||||
if (obj->flags & UNINTERESTING)
|
||||
continue;
|
||||
while (obj->type == OBJ_TAG)
|
||||
obj = deref_tag(obj, NULL, 0);
|
||||
if (obj->type != OBJ_COMMIT)
|
||||
die("Non commit %s?", revs->pending.objects[i].name);
|
||||
|
|
Loading…
Reference in a new issue