diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-06-14 13:38:14 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-06-14 13:38:14 -0700 |
commit | 31da121f2d316575ec3c82dfc0c7442cdb7a7740 (patch) | |
tree | eb99d36a001a4d5a1b5a047cdfd1cc619fef027d /builtin/blame.c | |
parent | 765428699a5381f113d19974720bc91b5bfeaf1d (diff) | |
download | git-31da121f2d316575ec3c82dfc0c7442cdb7a7740.tar.gz |
blame, line-log: do not loop around deref_tag()jc/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>
Diffstat (limited to 'builtin/blame.c')
-rw-r--r-- | builtin/blame.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/builtin/blame.c b/builtin/blame.c index 048ed53c2f..0136dfcffa 100644 --- a/builtin/blame.c +++ b/builtin/blame.c @@ -2400,8 +2400,7 @@ 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); + obj = deref_tag(obj, NULL, 0); if (obj->type != OBJ_COMMIT) die("Non commit %s?", revs->pending.objects[i].name); if (sb->final) @@ -2428,8 +2427,7 @@ 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); + obj = deref_tag(obj, NULL, 0); if (obj->type != OBJ_COMMIT) die("Non commit %s?", revs->pending.objects[i].name); if (sb->final) |