summaryrefslogtreecommitdiff
path: root/t/t6406-merge-attr.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t6406-merge-attr.sh')
-rwxr-xr-xt/t6406-merge-attr.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/t/t6406-merge-attr.sh b/t/t6406-merge-attr.sh
index d5a4ac2d81..8494645837 100755
--- a/t/t6406-merge-attr.sh
+++ b/t/t6406-merge-attr.sh
@@ -207,4 +207,22 @@ test_expect_success 'custom merge does not lock index' '
git merge main
'
+test_expect_success 'binary files with union attribute' '
+ git checkout -b bin-main &&
+ printf "base\0" >bin.txt &&
+ echo "bin.txt merge=union" >.gitattributes &&
+ git add bin.txt .gitattributes &&
+ git commit -m base &&
+
+ printf "one\0" >bin.txt &&
+ git commit -am one &&
+
+ git checkout -b bin-side HEAD^ &&
+ printf "two\0" >bin.txt &&
+ git commit -am two &&
+
+ test_must_fail git merge bin-main 2>stderr &&
+ grep -i "warning.*cannot merge.*HEAD vs. bin-main" stderr
+'
+
test_done