git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Finn Arne Gangstad <finnag@pvv.org>
To: Johannes Sixt <j.sixt@viscovery.net>
Cc: Eyvind Bernhardsen <eyvind.bernhardsen@gmail.com>, git@vger.kernel.org
Subject: Re: [RFC] ll-merge: Normalize files before merging
Date: Fri, 11 Jun 2010 10:36:41 +0200	[thread overview]
Message-ID: <20100611083641.GB31109@pvv.org> (raw)
In-Reply-To: <4C11EB0D.20208@viscovery.net>

On Fri, Jun 11, 2010 at 09:51:41AM +0200, Johannes Sixt wrote:
> Am 6/11/2010 9:34, schrieb Eyvind Bernhardsen:
> > On 11. juni 2010 07:49, Johannes Sixt wrote:
> >> I think you are going overboard here. Normalization should only happen
> >> only for data that moves from the worktree to the database. But during a
> >> merge, at most one part can come from the worktree, methinks; you are
> >> normalizing all three of them, though.
> > 
> > Well, that's sort of the point.  All three are normalized to (hopefully)
> > minimize the differences between them, increasing the chance of a
> > successful merge.
> 
> I know what your point is. It is still inappropriate to call
> normalize_file() on data that comes from the repository. It is not the
> task of a merge procedure to blindly normalize data.

I don't think this argument holds. If git doesn't call
convert_to_git() automatically and you get a merge conflict, git WILL
call convert_to_git() on the result anyway when you add it, so it
can't be that horrible that this happens automatically for you?

If you add something to .gitattributes that causes the repository
representation of a file to change, and then try to merge an older
branch, isn't it more helpful if it works than if it fails miserably?

It would probably be more correct to do

conert_to_git(convert_to_work_tree(x)) for the parts taken from base
and theirs, in theory I guess that this can be true:

convert_to_git(x) != convert_to_git(convert_to_work_tree(x))

- Finn Arne

  reply	other threads:[~2010-06-11  8:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-10 20:48 [RFC] ll-merge: Normalize files before merging Eyvind Bernhardsen
2010-06-11  5:49 ` Johannes Sixt
2010-06-11  7:34   ` Eyvind Bernhardsen
2010-06-11  7:51     ` Johannes Sixt
2010-06-11  8:36       ` Finn Arne Gangstad [this message]
2010-06-11  8:47         ` Eyvind Bernhardsen
2010-06-11 19:44       ` Junio C Hamano
2010-06-11 20:56         ` Eyvind Bernhardsen

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100611083641.GB31109@pvv.org \
    --to=finnag@pvv.org \
    --cc=eyvind.bernhardsen@gmail.com \
    --cc=git@vger.kernel.org \
    --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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).