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

Re: Unmodified submodules shows up as dirty with 1.6.6.443.gd7346

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 18, 2010, 17:22 UTC
Message-ID
<7vr5pnqqem.fsf@alter.siamese.dyndns.org>
In-Reply-To
<4B549254.5090206@isy.liu.se>
Gustaf Hendeby <hendeby@isy.liu.se> writes:
> ....  I don't want to include
> these files in a .gitignore as they are named differently on different
> systems.  Hence, I include them in my .git/info/exclude file,...

I don't have a strong opinion on the submodules part of your issue, but the above part applies to projects with or without submodules, which I have an opinion, and because it is different from what I used to teach people, I think it is worth mentioning..

I used to say "Never place *~ (or *.swp) in .gitignore because they are only useful to you who use Emacs (or vim); and do have *.o in .gitignore, because everybody who compile your checkout would see it".

But I don't think the former is a right attitude. My thinking these days is that keeping these in .gitignore should not just be tolerated but should be actively encouraged, unless the project may need to track paths that match *~ or *.swp in the future,

If it is very unlikely that the project will ever track them, there is no harm done [*1*], and it will help other people because they don't have to add the same and common entries in their own .git/info/excludes file.

I am suspecting that your "these files ... are named differently on different systems" may fall into the same category. Your build may not produce "frotz.linux" when compiled on a FreeBSD box (and "frotz.fbsd" on a Linux box), but would it hurt more than it helps to list them in the same .gitignore to cover both?

[Footnote]

*1* Once it starts doing so, un-ignoring a special case can be done at that point in the history

Previous: Gustaf HendebyNext: Jens Lehmann
Message 6 of 11 in “Unmodified submodules shows up as dirty with 1.6.6.443.gd7346”
  1. Gustaf HendebyJan 18, 2010
  2. Jacob HelwigJan 18, 2010
  3. Gustaf HendebyJan 18, 2010
  4. Jacob HelwigJan 18, 2010
  5. Gustaf HendebyJan 18, 2010
  6. Junio C HamanoJan 18, 2010
  7. Jens LehmannJan 18, 2010
  8. Johannes SixtJan 19, 2010
  9. Gustaf HendebyJan 19, 2010
  10. Jacob HelwigJan 19, 2010
  11. Junio C HamanoJan 19, 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.