summaryrefslogtreecommitdiff
path: root/builtin/blame.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2016-06-27 09:56:49 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-06-27 09:56:50 -0700
commit2a5618ec78c5689295fa7feae590823df606f3b3 (patch)
tree552e3bab74f23aa8e5ec996fd41f42a94b222ce0 /builtin/blame.c
parentMerge branch 'et/add-chmod-x' (diff)
parentblame, line-log: do not loop around deref_tag() (diff)
downloadtgif-2a5618ec78c5689295fa7feae590823df606f3b3.tar.xz
Merge branch 'jc/deref-tag'
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.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/builtin/blame.c b/builtin/blame.c
index 759d84affb..e5deb9c67f 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)