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
Finn Arne Gangstad <finnag@pvv.org>
Date
Jun 10, 2010, 19:55 UTC
Message-ID
<20100610195555.GA20759@pvv.org>
In-Reply-To
<Pine.GSO.4.63.1006091943100.22466@shipon.roxen.com>
On Wed, Jun 09, 2010 at 08:04:34PM +0200, Henrik Grubbström wrote:
> 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?

Not before being committed, since you would otherwise have to add all other files before adding .gitattributes, but I am not sure even that is sufficient reason to claim the files are unmodified (see case 3 below).

I think we agree on the following:

If there is a discrepancy between .gitattributes and the contents in the repository, the following should be true:

git checkout -f (or git reset --hard) git status -> ALWAYS report modified files in strict mode sleep 1 touch * git status -> NEVER report modified files in relaxed mode

The case I think you are asking about above is the following in "relaxed" mode:

echo "something that causes a discrepancy" >> .gitattributes git status -> MODIFIED (1) git add .gitattributes git status -> MODIFIED (2) git commit -m "bad commit" git status -> ??????? (3) <<-- Do you want this to be CLEAN? git reset --hard (or git checkout -f) sleep 1 touch * git status -> CLEAN (4)

1 and 4 should be uncontroversial and 2 I think is necessary because you should be able to git add in several steps. Whether 3 should be clean or modified I'm not so sure about, I think that it would make it more likely to get the repo normalized properly if it was still seen as modified there.

- Finn Arne
Previous: Henrik Grubbström
Message 19 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.