From: Junio C Hamano Date: Sun, 9 Sep 2012 04:28:55 +0000 (-0700) Subject: attr: "binary" attribute should choose built-in "binary" merge driver X-Git-Tag: v1.8.0-rc0~49^2~1 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=155a4b712efd3d917c228d155ec57ec2c09d7ac0;p=git.git attr: "binary" attribute should choose built-in "binary" merge driver The built-in "binary" attribute macro expands to "-diff -text", so that textual diff is not produced, and the contents will not go through any CR/LF conversion ever. During a merge, it should also choose the "binary" low-level merge driver, but it didn't. Make it expand to "-diff -merge -text". Signed-off-by: Junio C Hamano --- diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt index a85b187e0..ead725492 100644 --- a/Documentation/gitattributes.txt +++ b/Documentation/gitattributes.txt @@ -904,7 +904,7 @@ file at the toplevel (i.e. not in any subdirectory). The built-in macro attribute "binary" is equivalent to: ------------ -[attr]binary -diff -text +[attr]binary -diff -merge -text ------------ diff --git a/attr.c b/attr.c index 303751f6c..3f581b3ce 100644 --- a/attr.c +++ b/attr.c @@ -306,7 +306,7 @@ static void free_attr_elem(struct attr_stack *e) } static const char *builtin_attr[] = { - "[attr]binary -diff -text", + "[attr]binary -diff -merge -text", NULL, }; diff --git a/t/t6037-merge-ours-theirs.sh b/t/t6037-merge-ours-theirs.sh index 8d0567141..3889eca4a 100755 --- a/t/t6037-merge-ours-theirs.sh +++ b/t/t6037-merge-ours-theirs.sh @@ -54,7 +54,7 @@ test_expect_success 'recursive favouring ours' ' ' test_expect_success 'binary file with -Xours/-Xtheirs' ' - echo "file -merge" >.gitattributes && + echo file binary >.gitattributes && git reset --hard master && git merge -s recursive -X theirs side &&