Merge branch 'cn/maint-branch-with-bad'
* cn/maint-branch-with-bad: branch: don't assume the merge filter ref exists Conflicts: t/t3200-branch.sh
This commit is contained in:
commit
7d47367a47
@ -530,6 +530,10 @@ static int print_ref_list(int kinds, int detached, int verbose, int abbrev, stru
|
|||||||
if (merge_filter != NO_FILTER) {
|
if (merge_filter != NO_FILTER) {
|
||||||
struct commit *filter;
|
struct commit *filter;
|
||||||
filter = lookup_commit_reference_gently(merge_filter_ref, 0);
|
filter = lookup_commit_reference_gently(merge_filter_ref, 0);
|
||||||
|
if (!filter)
|
||||||
|
die("object '%s' does not point to a commit",
|
||||||
|
sha1_to_hex(merge_filter_ref));
|
||||||
|
|
||||||
filter->object.flags |= UNINTERESTING;
|
filter->object.flags |= UNINTERESTING;
|
||||||
add_pending_object(&ref_list.revs,
|
add_pending_object(&ref_list.revs,
|
||||||
(struct object *) filter, "");
|
(struct object *) filter, "");
|
||||||
|
@ -653,4 +653,8 @@ test_expect_success 'refuse --edit-description on unborn branch for now' '
|
|||||||
)
|
)
|
||||||
'
|
'
|
||||||
|
|
||||||
|
test_expect_success '--merged catches invalid object names' '
|
||||||
|
test_must_fail git branch --merged 0000000000000000000000000000000000000000
|
||||||
|
'
|
||||||
|
|
||||||
test_done
|
test_done
|
||||||
|
Loading…
Reference in New Issue
Block a user