All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eyvind Bernhardsen <eyvind.bernhardsen@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Johannes Sixt <j.sixt@viscovery.net>,
	Finn Arne Gangstad <finnag@pvv.org>,
	"git@vger.kernel.org List" <git@vger.kernel.org>
Subject: [PATCH v3 0/3] Help merging when text has been normalized
Date: Thu, 24 Jun 2010 22:44:29 +0200	[thread overview]
Message-ID: <cover.1277408598.git.eyvind.bernhardsen@gmail.com> (raw)

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

             reply	other threads:[~2010-06-24 20:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-24 20:44 Eyvind Bernhardsen [this message]
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

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=cover.1277408598.git.eyvind.bernhardsen@gmail.com \
    --to=eyvind.bernhardsen@gmail.com \
    --cc=finnag@pvv.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=j.sixt@viscovery.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 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.