aboutsummaryrefslogtreecommitdiff
path: root/merge-recursive.c
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2007-06-05 03:36:49 +0100
committerJunio C Hamano <gitster@pobox.com>2007-06-15 23:28:10 -0700
commitfadf488f9b8c4fc709f0b083d2769ecc1e0e1119 (patch)
tree9af600ad8903ae3f6aa32cabf713b8945f5f4ff5 /merge-recursive.c
parent634cd48a8afdd920fa26c8ec3ae43e96c82c81f2 (diff)
downloadgit-fadf488f9b8c4fc709f0b083d2769ecc1e0e1119.tar.gz
git-fadf488f9b8c4fc709f0b083d2769ecc1e0e1119.tar.xz
merge-recursive: refuse to merge binary files
[jc: cherry-picked 9f30855 from 'master'] Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'merge-recursive.c')
-rw-r--r--merge-recursive.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/merge-recursive.c b/merge-recursive.c
index 8f72b2c07..4a82b741a 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -680,6 +680,12 @@ static int ll_xdl_merge(const struct ll_merge_driver *drv_unused,
{
xpparam_t xpp;
+ if (buffer_is_binary(orig->ptr, orig->size) ||
+ buffer_is_binary(src1->ptr, src1->size) ||
+ buffer_is_binary(src2->ptr, src2->size))
+ return error("Cannot merge binary files: %s vs. %s\n",
+ name1, name2);
+
memset(&xpp, 0, sizeof(xpp));
return xdl_merge(orig,
src1, name1,