git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Gustaf Hendeby <hendeby@isy.liu.se>
Cc: Jacob Helwig <jacob.helwig@gmail.com>,
	git@vger.kernel.org, Jens.Lehmann@web.de
Subject: Re: Unmodified submodules shows up as dirty with 1.6.6.443.gd7346
Date: Mon, 18 Jan 2010 09:22:25 -0800	[thread overview]
Message-ID: <7vr5pnqqem.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <4B549254.5090206@isy.liu.se> (Gustaf Hendeby's message of "Mon\, 18 Jan 2010 17\:54\:44 +0100")

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

  parent reply	other threads:[~2010-01-18 17:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-18 15:30 Unmodified submodules shows up as dirty with 1.6.6.443.gd7346 Gustaf Hendeby
2010-01-18 16:02 ` Jacob Helwig
2010-01-18 16:54   ` Gustaf Hendeby
2010-01-18 17:14     ` Jacob Helwig
2010-01-18 17:27       ` Gustaf Hendeby
2010-01-18 17:22     ` Junio C Hamano [this message]
2010-01-18 20:50       ` Jens Lehmann
2010-01-19  7:13   ` Johannes Sixt
2010-01-19  8:23     ` Gustaf Hendeby
2010-01-19 14:31     ` Jacob Helwig
2010-01-19 17:29     ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vr5pnqqem.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=Jens.Lehmann@web.de \
    --cc=git@vger.kernel.org \
    --cc=hendeby@isy.liu.se \
    --cc=jacob.helwig@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).