From: Finn Arne Gangstad <finnag@pvv.org>
To: Eyvind Bernhardsen <eyvind.bernhardsen@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
Johannes Sixt <j.sixt@viscovery.net>,
"git@vger.kernel.org List" <git@vger.kernel.org>
Subject: Re: [PATCH v4 1/3] Avoid conflicts when merging branches with mixed normalization
Date: Mon, 28 Jun 2010 10:02:34 +0200 [thread overview]
Message-ID: <20100628080234.GA7134@pvv.org> (raw)
In-Reply-To: <07a766a7972671b9e39dbca55719d024c30c7a28.1277667177.git.eyvind.bernhardsen@gmail.com>
> --- a/Documentation/gitattributes.txt
> +++ b/Documentation/gitattributes.txt
> @@ -317,6 +317,18 @@ command is "cat").
> smudge = cat
> ------------------------
>
> +For best results, `clean` and `smudge` commands should produce output
> +that is not dependent on the corresponding command having been run.
> +That is, `clean` should produce identical output whether its input has
> +been run through `smudge` or not, and `smudge` should not rely on its
> +input having been run through `clean`. See the section on merging
> +below for a rationale.
I think this is marginally unclear, what about:
Clean should not alter its output further if run again
clean(x) == clean(clean(x))
Smudge should not alter the output of clean
clean(x) == clean(smudge(x))
It should not matter that smudge will do something weird if clean
hasn't been run, as long as clean(x) == clean(smudge(x)) still
holds. I also think it is worth mentioning explicitly that clean can
be run multiple times, you should not have to infer this.
> [...]
> +Merging branches with differing checkin/checkout attributes
> +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Maybe something about when this happens, or even put it in the header
instead? Something like
If you have added attributes to a file that cause the canonical
repository format for that file to change, such as adding a
clean/smudge filter or text/eol/ident attributes, merging anything based
on a point in time where the attribute was not in place would normally
cause merge conflicts.
> +
> +To prevent unnecessary merge conflicts, git runs a virtual check-out
> +and check-in of all three stages of a file when resolving a three-way
> +merge. This prevents changes caused by check-in conversion from
> +causing spurious merge conflicts when a converted file is merged with
> +an unconverted file.
- Finn Arne
next prev parent reply other threads:[~2010-06-28 8:02 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-27 19:43 [PATCH v4 0/3] CRLF merge conflict reduction, take 4 Eyvind Bernhardsen
2010-06-27 19:43 ` [PATCH v4 1/3] Avoid conflicts when merging branches with mixed normalization Eyvind Bernhardsen
2010-06-28 8:02 ` Finn Arne Gangstad [this message]
2010-06-28 19:32 ` [PATCH] Clarify text filter merge conflict reduction docs Eyvind Bernhardsen
2010-06-28 20:31 ` Finn Arne Gangstad
2010-06-29 16:19 ` Junio C Hamano
2010-06-29 21:18 ` Eyvind Bernhardsen
2010-06-30 17:46 ` Junio C Hamano
2010-06-30 21:32 ` Eyvind Bernhardsen
2010-07-01 3:33 ` Junio C Hamano
2010-06-30 8:20 ` Eyvind Bernhardsen
2010-06-30 15:15 ` Junio C Hamano
2010-06-27 19:43 ` [PATCH v4 2/3] Try normalizing files to avoid delete/modify conflicts when merging Eyvind Bernhardsen
2010-06-27 19:43 ` [PATCH v4 3/3] Don't expand CRLFs when normalizing text during merge 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100628080234.GA7134@pvv.org \
--to=finnag@pvv.org \
--cc=eyvind.bernhardsen@gmail.com \
--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 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 NNTP newsgroup(s).