提交 155a4b71 编写于 作者: J Junio C Hamano

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: NJunio C Hamano <gitster@pobox.com>
上级 a944af1d
......@@ -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
------------
......
......@@ -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,
};
......
......@@ -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 &&
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册