diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-07-06 13:06:46 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-07-06 13:06:46 -0700 |
commit | f83819835763c2448abc2c18c4fe750368408264 (patch) | |
tree | dc8d84609c10ccdd1fbb643f6597f86e41412c13 | |
parent | f7927316cf7b6252e27e54cdd2929039253c2422 (diff) | |
parent | 31da121f2d316575ec3c82dfc0c7442cdb7a7740 (diff) | |
download | git-f83819835763c2448abc2c18c4fe750368408264.tar.gz |
Merge branch 'jc/deref-tag' into maint
Code clean-up.
* jc/deref-tag:
blame, line-log: do not loop around deref_tag()
-rw-r--r-- | builtin/blame.c | 6 | ||||
-rw-r--r-- | line-log.c | 3 |
2 files changed, 3 insertions, 6 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) diff --git a/line-log.c b/line-log.c index bbe31ed6fb..1fbbe4f0af 100644 --- a/line-log.c +++ b/line-log.c @@ -480,8 +480,7 @@ 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); + obj = deref_tag(obj, NULL, 0); if (obj->type != OBJ_COMMIT) die("Non commit %s?", revs->pending.objects[i].name); if (commit) |