All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/3] Help merging when text has been normalized
@ 2010-06-24 20:44 Eyvind Bernhardsen
  2010-06-24 20:44 ` [PATCH v3 1/3] Avoid conflicts when merging branches with mixed normalization Eyvind Bernhardsen
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Eyvind Bernhardsen @ 2010-06-24 20:44 UTC (permalink / raw)
  To: Junio C Hamano
  Cc: Johannes Sixt, Finn Arne Gangstad, git@vger.kernel.org List

Here's a slightly expanded series based on my ll-merge normalization
patch.  I've been working in a repository that uses "* text=auto" at
$dayjob, and this series helps a lot when merging older,
pre-normalization branches.

The first commit is a cleaned-up version of the previous patch.  I
borrowed Finn Arne's explanation for why it's useful for my commit
message, ASCII art and all.  The idea is pretty simple: normalization
might differ between branches, so renormalization is required to prevent
(or at least reduce) conflicts.

The second fixes a similar problem, but for delete/modify conflicts.  If
a file is normalized on a branch but deleted in another, merging the
branches will cause a conflict even though the actual content of the
file hasn't changed at all.

If the merge-base version of the file and the modified file differ they
are both normalized, and if either was changed by normalization they are
compared.  If they compare equal, the file is considered unmodified and
is deleted.

The third patch prevents normalization from expanding and then
collapsing CRLFs, saving time and memory when core.autocrlf=true or
core.eol=crlf.

- Eyvind

Eyvind Bernhardsen (3):
  Avoid conflicts when merging branches with mixed normalization
  Try normalizing files to avoid delete/modify conflicts when merging
  Don't expand CRLFs when normalizing text during merge

 cache.h                    |    1 +
 convert.c                  |   27 ++++++++++++++++----
 ll-merge.c                 |   12 +++++++++
 merge-recursive.c          |   42 ++++++++++++++++++++++++++++++-
 t/t6038-merge-text-auto.sh |   58 ++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 133 insertions(+), 7 deletions(-)
 create mode 100755 t/t6038-merge-text-auto.sh

-- 
1.7.1.575.g383de

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-06-25  8:59 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-24 20:44 [PATCH v3 0/3] Help merging when text has been normalized Eyvind Bernhardsen
2010-06-24 20:44 ` [PATCH v3 1/3] Avoid conflicts when merging branches with mixed normalization Eyvind Bernhardsen
2010-06-24 20:44 ` [PATCH v3 2/3] Try normalizing files to avoid delete/modify conflicts when merging Eyvind Bernhardsen
2010-06-24 20:44 ` [PATCH v3 3/3] Don't expand CRLFs when normalizing text during merge Eyvind Bernhardsen
2010-06-25  5:45   ` Johannes Sixt
2010-06-25  7:58     ` Eyvind Bernhardsen
2010-06-25  8:17       ` Johannes Sixt
2010-06-25  8:58         ` Eyvind Bernhardsen
2010-06-25  8:00     ` Finn Arne Gangstad

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.