diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-03-01 14:44:17 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-03-01 14:44:17 -0800 |
commit | 7d47367a47c8811f62ad8787091cb27e507c165e (patch) | |
tree | 2bbbbe59da90ccf5ada1391cce11cb0a0d87426d /builtin | |
parent | f051ad6d118aff0252beed36d20a56d1823fc90b (diff) | |
parent | 6c41e97557d94df7085e3c0cff247305c9401968 (diff) | |
download | git-7d47367a47c8811f62ad8787091cb27e507c165e.tar.gz |
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
Diffstat (limited to 'builtin')
-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 cb17bc3675..d8cccf725d 100644 --- a/builtin/branch.c +++ b/builtin/branch.c @@ -530,6 +530,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, ""); |