summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2016-04-14 18:57:49 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-04-14 18:57:49 -0700
commita5953f68186e72b3fe7b7dc0b2a7cb0f451cf3ef (patch)
treeabad8ddc1b590700b28d29973cd05fb2fd9d4894 /t
parentMerge branch 'ss/commit-squash-msg' into maint (diff)
parentmerge: fix NULL pointer dereference when merging nothing into void (diff)
downloadtgif-a5953f68186e72b3fe7b7dc0b2a7cb0f451cf3ef.tar.xz
Merge branch 'jv/merge-nothing-into-void' into maint
"git merge FETCH_HEAD" dereferenced NULL pointer when merging nothing into an unborn history (which is arguably unusual usage, which perhaps was the reason why nobody noticed it). * jv/merge-nothing-into-void: merge: fix NULL pointer dereference when merging nothing into void
Diffstat (limited to 't')
-rwxr-xr-xt/t7600-merge.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t7600-merge.sh b/t/t7600-merge.sh
index dc9f142f53..85248a14b6 100755
--- a/t/t7600-merge.sh
+++ b/t/t7600-merge.sh
@@ -753,4 +753,14 @@ test_expect_success 'merge detects mod-256 conflicts (resolve)' '
test_must_fail git merge -s resolve master
'
+test_expect_success 'merge nothing into void' '
+ git init void &&
+ (
+ cd void &&
+ git remote add up .. &&
+ git fetch up &&
+ test_must_fail git merge FETCH_HEAD
+ )
+'
+
test_done