diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-07-06 22:06:46 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-07-06 22:06:46 +0200 |
commit | f83819835763c2448abc2c18c4fe750368408264 (patch) | |
tree | dc8d84609c10ccdd1fbb643f6597f86e41412c13 /builtin/blame.c | |
parent | Merge branch 'pb/strbuf-read-file-doc' into maint (diff) | |
parent | blame, line-log: do not loop around deref_tag() (diff) | |
download | git-f83819835763c2448abc2c18c4fe750368408264.tar.xz git-f83819835763c2448abc2c18c4fe750368408264.zip |
Merge branch 'jc/deref-tag' into maint
Code clean-up.
* jc/deref-tag:
blame, line-log: do not loop around deref_tag()
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 21f42b0b62..7417edf6ef 100644 --- a/builtin/blame.c +++ b/builtin/blame.c @@ -2425,8 +2425,7 @@ static struct commit *find_single_final(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); + obj = deref_tag(obj, NULL, 0); if (obj->type != OBJ_COMMIT) die("Non commit %s?", revs->pending.objects[i].name); if (found) @@ -2461,8 +2460,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) |