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

Re: 1.8.3 - gitignore not being parsed correctly on OS X; regex support is broken?

From
Junio C Hamano <gitster@pobox.com>
Date
May 28, 2013, 21:59 UTC
Message-ID
<7vhahmydcy.fsf@alter.siamese.dyndns.org>
In-Reply-To
<loom.20130528T232459-307@post.gmane.org>
Øystein Walle <oystwa@gmail.com> writes:
Show 55 quoted lines
> Misty De Meo <misty <at> brew.sh> writes:
>
>> 
>> Hi,
>> 
>> Gitignore parsing no longer seems to work properly in git 1.8.3.
>> 
>> One of my repositories has the following gitignore:
>> 
>> /*
>> !/.gitignore
>> !/Library/
>> !/CONTRIBUTING.md
>> !/README.md
>> !/SUPPORTERS.md
>> !/bin
>> /bin/*
>> !/bin/brew
>> !/share/man/man1/brew.1
>> .DS_Store
>> /Library/LinkedKegs
>> /Library/PinnedKegs
>> /Library/Taps
>> /Library/Formula/.gitignore
>> 
>> In 1.8.2.3 and earlier, this works as expected. However, in 1.8.3 I'm
>> seeing every file in /bin/ being marked as an untracked file.
>> 
>> I asked about this in #git, and was told that the culprit was the
>> regex support; apparently recompiling without regex support fixes the
>> specific gitignore issue. However, this doesn't seem to have been
>> reported anywhere on the mailing list that I can see. I was also told
>> that the issue is OS X-specific, and doesn't happen on other
>> platforms.
>> 
>> Thanks,
>> Misty De Meo
>> 
>
> I see a similar problem using e.g. the following .gitignore to exclude
> everything except C source files and header files:
>
>     *
>     !*/
>     !*.c
>     !*.h
>
> In Git 1.8.3 'git status' will show other files as untracked while in
> Git 1.8.2.3 I don't have that problem. I bisected to find that the
> offending commit is v1.8.2.1-402-g95c6f27. 
>
> I am not on OSX, however, but on Linux (Ubuntu 12.04 and RHEL 5.8) so
> this may be a separate issue. I've also gotten the impression that this
> is intentional. In any case I cannot create a .gitignore that achieves
> the same for both older and newer versions of Git.

Thanks; 95c6f27 is from Karsten and I think Duy is the most clueful one in this area in the discussion that had this change; I am forwarding this message to them.

Cf. http://thread.gmane.org/gmane.comp.version-control.git/218440/focus=221289
Previous: Øystein WalleNext: Duy Nguyen
Message 3 of 16 in “1.8.3 - gitignore not being parsed correctly on OS X; regex support is broken?”
  1. Misty De MeoMay 28, 2013
  2. Øystein WalleMay 28, 2013
  3. Junio C HamanoMay 28, 2013
  4. Duy NguyenMay 29, 2013
  5. Duy NguyenMay 29, 2013
  6. David AguilarMay 29, 2013
  7. Karsten BleesMay 29, 2013
  8. Øystein WalleMay 29, 2013
  9. dir.c: fix ignore processing within not-ignored directoriesKarsten Blees, May 29, 2013
  10. Duy NguyenJun 1, 2013
  11. Junio C HamanoJun 2, 2013
  12. Karsten BleesJun 4, 2013
  13. t/README: test_must_fail is for testing GitJunio C Hamano, Jun 4, 2013
  14. Philip OakleyJun 4, 2013
  15. Junio C HamanoJun 4, 2013
  16. Philip OakleyJun 4, 2013

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.