git/builtin
Eyvind Bernhardsen f217f0e86d Avoid conflicts when merging branches with mixed normalization
Currently, merging across changes in line ending normalization is
painful since files containing CRLF will conflict with normalized files,
even if the only difference between the two versions is the line
endings.  Additionally, any "real" merge conflicts that exist are
obscured because every line in the file has a conflict.

Assume you start out with a repo that has a lot of text files with CRLF
checked in (A):

      o---C
     /     \
    A---B---D

B: Add "* text=auto" to .gitattributes and normalize all files to
   LF-only

C: Modify some of the text files

D: Try to merge C

You will get a ridiculous number of LF/CRLF conflicts when trying to
merge C into D, since the repository contents for C are "wrong" wrt the
new .gitattributes file.

Fix ll-merge so that the "base", "theirs" and "ours" stages are passed
through convert_to_worktree() and convert_to_git() before a three-way
merge.  This ensures that all three stages are normalized in the same
way, removing from consideration differences that are only due to
normalization.

This feature is optional for now since it changes a low-level mechanism
and is not necessary for the majority of users.  The "merge.renormalize"
config variable enables it.

Signed-off-by: Eyvind Bernhardsen <eyvind.bernhardsen@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-02 15:43:15 -07:00
..
add.c Rewrite dynamic structure initializations to runtime assignment 2010-05-31 16:59:26 -07:00
annotate.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
apply.c Merge branch 'pc/remove-warn' into maint 2010-06-22 08:30:38 -07:00
archive.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
bisect--helper.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
blame.c Merge branch 'cp/textconv-cat-file' 2010-06-27 12:07:55 -07:00
branch.c Merge branch 'sm/branch-broken-ref' 2010-06-21 06:02:47 -07:00
bundle.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
cat-file.c Merge branch 'cp/textconv-cat-file' 2010-06-27 12:07:55 -07:00
check-attr.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
check-ref-format.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
checkout-index.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
checkout.c Merge branch 'gv/portable' 2010-06-21 06:02:44 -07:00
clean.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
clone.c Merge branch 'ph/clone-message-reword' 2010-06-18 11:16:53 -07:00
commit-tree.c make commit_tree a library function 2010-04-01 23:53:54 -07:00
commit.c Merge branch 'cc/maint-commit-reflog-msg' into maint 2010-06-22 09:31:48 -07:00
config.c Allow passing of configuration parameters in the command line 2010-03-28 09:48:25 -07:00
count-objects.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
describe.c Merge branch 'sp/maint-describe-tiebreak-with-tagger-date' into maint 2010-06-16 16:21:15 -07:00
diff-files.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
diff-index.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
diff-tree.c Merge branch 'pb/log-first-parent-p-m' 2010-03-24 16:25:39 -07:00
diff.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
fast-export.c Merge branch 'maint' 2010-03-28 17:42:58 -07:00
fetch-pack.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
fetch.c Rewrite dynamic structure initializations to runtime assignment 2010-05-31 16:59:26 -07:00
fmt-merge-msg.c merge: --log appends shortlog to message if specified 2010-05-10 12:02:20 -07:00
for-each-ref.c Merge branch 'maint' 2010-06-07 22:15:31 -07:00
fsck.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
gc.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
grep.c Merge branch 'np/malloc-threading' into maint 2010-06-16 16:21:06 -07:00
hash-object.c Merge branch 'lt/deepen-builtin-source' 2010-03-10 15:25:18 -08:00
help.c enums: omit trailing comma for portability 2010-05-31 16:59:27 -07:00
index-pack.c Merge branch 'np/index-pack-memsave' into maint 2010-06-16 16:22:23 -07:00
init-db.c handle "git --bare init <dir>" properly 2010-05-10 11:25:37 -07:00
log.c format-patch: Add a signature option (--signature) 2010-06-16 10:08:59 -07:00
ls-files.c ls-files: allow relative pathspec 2010-06-05 09:14:31 -07:00
ls-remote.c ls-remote: print URL when no repo is specified 2010-05-11 22:55:44 -07:00
ls-tree.c ls: remove redundant logic 2010-03-21 16:23:44 -07:00
mailinfo.c enums: omit trailing comma for portability 2010-05-31 16:59:27 -07:00
mailsplit.c Merge branch 'sh/am-keep-cr' 2010-03-10 15:32:34 -08:00
merge-base.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
merge-file.c Merge branch 'rs/diff-no-minimal' into maint 2010-06-21 05:38:50 -07:00
merge-index.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
merge-ours.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
merge-recursive.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
merge-tree.c Merge branch 'rs/diff-no-minimal' into maint 2010-06-21 05:38:50 -07:00
merge.c Avoid conflicts when merging branches with mixed normalization 2010-07-02 15:43:15 -07:00
mktag.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
mktree.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
mv.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
name-rev.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
notes.c Merge branch 'maint' 2010-06-25 11:45:27 -07:00
pack-objects.c Merge branch 'np/malloc-threading' into maint 2010-06-16 16:21:06 -07:00
pack-redundant.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
pack-refs.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
patch-id.c patch-id: Add support for mbox format 2010-04-19 13:01:49 -07:00
prune-packed.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
prune.c Merge branch 'lt/deepen-builtin-source' 2010-03-10 15:25:18 -08:00
push.c Merge branch 'maint' 2010-04-09 22:43:18 -07:00
read-tree.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
receive-pack.c Merge branch 'tr/receive-pack-aliased-update-fix' 2010-06-21 06:02:46 -07:00
reflog.c Merge branch 'jc/maint-no-reflog-expire-unreach-for-head' 2010-05-21 04:02:18 -07:00
remote.c Merge branch 'gv/portable' 2010-06-21 06:02:44 -07:00
replace.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
rerere.c Merge branch 'rs/diff-no-minimal' into maint 2010-06-21 05:38:50 -07:00
reset.c Sync with 1.7.0.4 2010-03-31 15:14:27 -07:00
rev-list.c Merge branch 'ef/maint-empty-commit-log' 2010-04-06 14:50:46 -07:00
rev-parse.c parseopt: wrap rev-parse --parseopt usage for eval consumption 2010-06-13 09:38:14 -07:00
revert.c revert: allow cherry-picking more than one commit 2010-06-02 10:09:56 -07:00
rm.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
send-pack.c Merge branch 'ld/push-porcelain' 2010-03-15 00:58:24 -07:00
shortlog.c Merge branch 'jn/shortlog' into maint 2010-06-16 16:22:51 -07:00
show-branch.c show-branch: use DEFAULT_ABBREV instead of 7 2010-05-25 09:48:49 -07:00
show-ref.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
stripspace.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
symbolic-ref.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
tag.c tag -v: use RUN_GIT_CMD to run verify-tag 2010-04-17 12:40:19 -07:00
tar-tree.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
unpack-file.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
unpack-objects.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
update-index.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
update-ref.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
update-server-info.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
upload-archive.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
var.c Merge branch 'lt/deepen-builtin-source' 2010-03-10 15:25:18 -08:00
verify-pack.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
verify-tag.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
write-tree.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00