From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Cc: Stephen Bash <bash@genarts.com>, Jeff King <peff@peff.net>
Subject: [PATCH 2/2] attr: "binary" attribute should choose built-in "binary" merge driver
Date: Sat, 8 Sep 2012 21:40:39 -0700 [thread overview]
Message-ID: <1347165639-12149-3-git-send-email-gitster@pobox.com> (raw)
In-Reply-To: <1347165639-12149-1-git-send-email-gitster@pobox.com>
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 <gitster@pobox.com>
---
Documentation/gitattributes.txt | 2 +-
attr.c | 2 +-
t/t6037-merge-ours-theirs.sh | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt
index a85b187..ead7254 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 303751f..3f581b3 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 8d05671..3889eca 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 &&
--
1.7.12.322.g2c7d289
next prev parent reply other threads:[~2012-09-09 4:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1799969825.275125.1347028392272.JavaMail.root@genarts.com>
2012-09-07 14:48 ` Binary file-friendly merge -Xours or -Xtheirs? Stephen Bash
2012-09-07 21:47 ` Junio C Hamano
2012-09-09 4:40 ` [PATCH 0/2] Teaching -Xours/-Xtheirs to binary ll-merge driver Junio C Hamano
2012-09-09 4:40 ` [PATCH 1/2] merge: teach " Junio C Hamano
2012-09-09 4:40 ` Junio C Hamano [this message]
2012-09-10 14:03 ` [PATCH 2/2] attr: "binary" attribute should choose built-in "binary" merge driver Jeff King
2012-09-12 8:55 ` Junio C Hamano
2012-09-12 12:58 ` Stephen Bash
2012-09-12 17:01 ` Junio C Hamano
2012-09-12 17:50 ` Stephen Bash
2012-09-12 13:17 ` Jeff King
2012-09-09 14:30 ` [PATCH 0/2] Teaching -Xours/-Xtheirs to binary ll-merge driver Stephen Bash
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1347165639-12149-3-git-send-email-gitster@pobox.com \
--to=gitster@pobox.com \
--cc=bash@genarts.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).