diff options
-rw-r--r-- | revision.c | 8 | ||||
-rwxr-xr-x | t/t6000-rev-list-misc.sh | 11 |
2 files changed, 13 insertions, 6 deletions
diff --git a/revision.c b/revision.c index 28449c5140..aec03332ca 100644 --- a/revision.c +++ b/revision.c @@ -273,6 +273,7 @@ static struct commit *handle_commit(struct rev_info *revs, struct object *object return NULL; die("bad object %s", sha1_to_hex(tag->tagged->sha1)); } + object->flags |= flags; } /* @@ -284,7 +285,6 @@ static struct commit *handle_commit(struct rev_info *revs, struct object *object if (parse_commit(commit) < 0) die("unable to parse commit %s", name); if (flags & UNINTERESTING) { - commit->object.flags |= UNINTERESTING; mark_parents_uninteresting(commit); revs->limited = 1; } @@ -302,7 +302,6 @@ static struct commit *handle_commit(struct rev_info *revs, struct object *object if (!revs->tree_objects) return NULL; if (flags & UNINTERESTING) { - tree->object.flags |= UNINTERESTING; mark_tree_contents_uninteresting(tree); return NULL; } @@ -314,13 +313,10 @@ static struct commit *handle_commit(struct rev_info *revs, struct object *object * Blob object? You know the drill by now.. */ if (object->type == OBJ_BLOB) { - struct blob *blob = (struct blob *)object; if (!revs->blob_objects) return NULL; - if (flags & UNINTERESTING) { - blob->object.flags |= UNINTERESTING; + if (flags & UNINTERESTING) return NULL; - } add_pending_object(revs, object, ""); return NULL; } diff --git a/t/t6000-rev-list-misc.sh b/t/t6000-rev-list-misc.sh index 9ad4971f81..3794e4ceaf 100755 --- a/t/t6000-rev-list-misc.sh +++ b/t/t6000-rev-list-misc.sh @@ -62,4 +62,15 @@ test_expect_success 'propagate uninteresting flag down correctly' ' test_cmp expect actual ' +test_expect_success 'symleft flag bit is propagated down from tag' ' + git log --format="%m %s" --left-right v1.0...master >actual && + cat >expect <<-\EOF && + > two + > one + < another + < that + EOF + test_cmp expect actual +' + test_done |