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

Re: BUGREPORT: Modified files on a fresh clone on M2 MacBook Pro

From
Jeff King <peff@peff.net>
Date
Mar 22, 2023, 17:33 UTC
Message-ID
<20230322173351.GC4296@coredump.intra.peff.net>
In-Reply-To
<CAJoAoZkKTGzgVyL2wM9a4VcFObx4YpjMSatH9Bpqcgyi=zzBrQ@mail.gmail.com>
On Wed, Mar 22, 2023 at 09:46:11AM -0700, Emily Shaffer wrote:
Show 17 quoted lines
> On Wed, Mar 22, 2023 at 9:38 AM Sjur Moshagen <sjurnm@mac.com> wrote:
> >
> > Thank you for filling out a Git bug report!
> > Please answer the following questions to help us understand your issue.
> >
> > What did you do before the bug happened? (Steps to reproduce your issue)
> > git clone https://github.com/giellalt/lang-sma
> >
> > What did you expect to happen? (Expected behavior)
> > Clone to be clean, as reported by git status
> >
> > What happened instead? (Actual behavior)
> > git status reported four changed files
> 
> It would help to know which files, or what the difference was, so we
> have a chance to figure out what happens without having to go and buy
> a Macbook :)
Just a guess, but it probably has to do with Unicode normalization.
  $ git clone https://github.com/giellalt/lang-sma
  $ cd lang-sma
  $ git ls-files -z |
    perl -MUnicode::Normalize -0ne '
      chomp;
      print "$_\n" if NFD($_) ne $_;
    '
  corp/SNÅSNINGEN 2014/10 uke/Arbeidsliv - sørsamisk.docx
  corp/SNÅSNINGEN 2014/10 uke/Arbeidsliv.docx
  [...and so on, there are 540 entries...]

HFS silently normalized everything to NFD. On newer installs using APFS, I think the rules are different, but I haven't followed the details.

I'm not sure if this is a red herring (after all, I'd expect 540 such files on HFS) or if some of the files are somehow special for APFS (I looked for obvious things like collisions after normalization, but didn't see any). I agree it would help to know which 4 files. :)

-Peff
Previous: Sjur MoshagenNext: Jeff King
Message 9 of 12 in “BUGREPORT: Modified files on a fresh clone on M2 MacBook Pro”
  1. Sjur MoshagenMar 22, 2023
  2. Emily ShafferMar 22, 2023
  3. Sjur MoshagenMar 22, 2023
  4. Kristoffer HaugsbakkMar 22, 2023
  5. Sjur MoshagenMar 22, 2023
  6. Junio C HamanoMar 22, 2023
  7. Kristoffer HaugsbakkMar 22, 2023
  8. Sjur MoshagenMar 22, 2023
  9. Jeff KingMar 22, 2023
  10. Jeff KingMar 22, 2023
  11. Torsten BögershausenMar 23, 2023
  12. Junio C HamanoMar 24, 2023

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.