diff options
Diffstat (limited to 'builtin/branch.c')
-rw-r--r-- | builtin/branch.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/builtin/branch.c b/builtin/branch.c index df908ed8f5..d6691af0a5 100644 --- a/builtin/branch.c +++ b/builtin/branch.c @@ -528,6 +528,10 @@ static int print_ref_list(int kinds, int detached, int verbose, int abbrev, stru if (merge_filter != NO_FILTER) { struct commit *filter; 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; add_pending_object(&ref_list.revs, (struct object *) filter, ""); |