diff options
author | Beat Bolli <dev+git@drbeat.li> | 2015-11-23 22:32:12 +0100 |
---|---|---|
committer | Jeff King <peff@peff.net> | 2015-11-24 18:55:26 -0500 |
commit | 3c6de746bd461705fdaa6113085e62fb55705049 (patch) | |
tree | c58b4719d19f416304a5cf0d258f4c06a73905a5 /builtin/merge-file.c | |
parent | 5cb2e162d21fa45a63f186b31970e2e9c9b10ba9 (diff) | |
download | git-bb/merge-marker-crlf.tar.gz |
merge-file: consider core.crlf when writing merge markersbb/merge-marker-crlf
When merging files in repos with core.eol = crlf, git merge-file inserts
just a LF at the end of the merge markers. Files with mixed line endings
cause trouble in Windows editors and e.g. contrib/git-jump, where an
unmerged file in a run of "git jump merge" is reported as simply "binary
file matches".
Fixing this improves Git's behavior under Windows.
Signed-off-by: Beat Bolli <dev+git@drbeat.li>
Cc: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Jeff King <peff@peff.net>
Diffstat (limited to 'builtin/merge-file.c')
-rw-r--r-- | builtin/merge-file.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin/merge-file.c b/builtin/merge-file.c index 55447053f2..c534c91f44 100644 --- a/builtin/merge-file.c +++ b/builtin/merge-file.c @@ -81,6 +81,7 @@ int cmd_merge_file(int argc, const char **argv, const char *prefix) argv[i]); } + xmp.crlf = (core_eol == EOL_CRLF); xmp.ancestor = names[1]; xmp.file1 = names[0]; xmp.file2 = names[2]; |