Merge branch 'jc/deref-tag' into maint

Code clean-up.

* jc/deref-tag:
  blame, line-log: do not loop around deref_tag()
This commit is contained in:
Junio C Hamano 2016-07-06 13:06:46 -07:00
Родитель f7927316cf 31da121f2d
Коммит f838198357
2 изменённых файлов: 3 добавлений и 6 удалений

Просмотреть файл

@ -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)

Просмотреть файл

@ -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)