git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v4 0/5] Patches to avoid reporting conversion changes.

From
HGHenrik Grubbström <grubba@roxen.com>
Date
Jun 9, 2010, 18:04 UTC
Message-ID
<Pine.GSO.4.63.1006091943100.22466@shipon.roxen.com>
In-Reply-To
<20100609140327.GA19828@pvv.org>
On Wed, 9 Jun 2010, Finn Arne Gangstad wrote:
Show 23 quoted lines
> On Tue, Jun 08, 2010 at 05:52:37PM +0200, Henrik Grubbström wrote:
>
>> [...]
>> True, there's no problem before the attribute change, but there is for
>> commits between the attribute change and when the repository got
>> normalized (which can be a while with the current git).
>
> As you say, the current git makes it easy to commit something where
> the attributes and the contents do not match. I think this needs to be
> fixed, and that your proposed patch in relaxed mode makes the problem
> _worse_, since it will then take even longer before these commits are
> fixed. But see below.
>
>>
>> Re: configuration option naming:
>>
>>   I've settled for core.normalizationPolicy, with the values
>>   'strict' (default) for the behaviour requested by you and Jonathan,
>>   and 'relaxed' for my initial behaviour.
>
> The name might be a bit vague, maybe there are other things that could
> be normalized? Maybe adding the word "index" is an improvement -
> e.g. core.indexNormalizationPolicy or just core.indexNormalization.
Hmm... Maybe.
>> Teaser:
[...]
Show 5 quoted lines
>
> THIS behaviour is what I find scary. In this case, "ident" is clearly
> a newly added attribute, and git should not hide this from you. If you
> add a mode where git will hide this permanently, chances are the
> repositories will never be fixed.
True.
Show 21 quoted lines
> The ident attribute may be a bit special since in your case it is only
> supposed to change if some other contents in the file change as well,
> but please also think how this will work with the text/eol
> attributes. Setting the text attribute and then having to CHANGE a
> file before getting it normalized is not good.
>
> Still, I think your original problem description of cloning something
> and ending up with a dirty tree is indeed an annoying problem.  So
> what about having the relaxed mode behave as follows:
>
> If both of these are true:
> - the current attributes for a file are the same as it is registered as
>   in the index with your new patch
> - a checkout of the file would result in identical contents to what is
>   currently in the working directory
> Then behave as if the file is not modified.
>
> Or, in other words: If attributes are unchanged, a file is unmodified
> not only if it would result in the same contents after being added,
> but also if it would result in the current working directory
> contents after being checked out again.

Ok, so the expanded-keywords file in the example should show up as modified in relaxed mode as well, but be cleaned if the modified attributes file is added to the index? Or only after being committed?

> This should work for both text and ident on clone at least.
I'll see what I can do...

Currently, I'm trying to understand the semantic difference between ce_modified() and ce_match_stat().

-- Henrik Grubbström grubba@grubba.org Roxen Internet Software AB grubba@roxen.com

Previous: Finn Arne GangstadNext: Finn Arne Gangstad
Message 18 of 19 in “Patches to avoid reporting conversion changes.”
  1. 0/5 Patches to avoid reporting conversion changes.Henrik Grubbström (Grubba), Jun 1, 2010
  2. 1/5 sha1_file: Add index_blob().Henrik Grubbström (Grubba), Jun 1, 2010
  3. 2/5 strbuf: Add strbuf_add_uint32().Henrik Grubbström (Grubba), Jun 1, 2010
  4. 3/5 cache: Keep track of conversion mode changes.Henrik Grubbström (Grubba), Jun 1, 2010
  5. 4/5 cache: Add index extension "CONV".Henrik Grubbström (Grubba), Jun 1, 2010
  6. 5/5 t/t0021: Test that conversion changes are detected.Henrik Grubbström (Grubba), Jun 1, 2010
  7. Junio C HamanoJun 2, 2010
  8. Henrik GrubbströmJun 3, 2010
  9. Jonathan NiederJun 4, 2010
  10. Henrik GrubbströmJun 4, 2010
  11. Jonathan NiederJun 4, 2010
  12. Henrik GrubbströmJun 6, 2010
  13. Finn Arne GangstadJun 7, 2010
  14. Henrik GrubbströmJun 7, 2010
  15. Finn Arne GangstadJun 7, 2010
  16. Henrik GrubbströmJun 8, 2010
  17. Finn Arne GangstadJun 9, 2010
  18. Henrik GrubbströmJun 9, 2010
  19. Finn Arne GangstadJun 10, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.