Re: Default exclude rules for Git

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 19, 2008 at 08:46:34AM -0700, Junio C Hamano wrote:
> I do not see a need to change any canned template shipped with git.  I
> actually think it is a grave regression to add anything arbitrary, even if
> one person happens to think the choice is conservative, to the set of
> tool-wide ignore patterns.  And here is why.
> 
> I haven't personally seen any project that wants its users to _edit_ a
> file whose names end with ".a" or ".o" and track it.  That does not
> however mean that there can be no project and/or environment that validly
> wants to track files with ".o" suffix (isn't it the case that windows shop
> use ".obj" for object files and ".o" suffix do not have any particular
> meaning to them?)  By placing "*.o" to tool-wide ignore file, your version
> of git is making life for participants in such a project harder because
> they can now easily forget to add a newly created "*.o" files (status
> won't show them).  The tool should be extremely conservative not to
> encourage such mistakes.
> 
> The best place to express such a project wide policy (e.g. "in this
> project, '*.o' files will never, or rarely if ever, be tracked and we
> expect our developers to appreciate not seeing them in status output by
> default") is a tracked .gitignore file.

Yes, but the idea here is to give both the projects and the users
sensible default to work on, in case of users even one that might change
system to system based on tools behavior. It is that VAST MAJORITY of
projects won't care about object or (most kinds of) hidden files, so to
me it makes sense to make people opt out instead of opt in.

If a particular policy is unsuitable for some (rare) project, it can
still undo the ignore rules by adding !*.o to its .gitignore file. The
only issue is that this gets noticed first time a particular new ignore
pattern appears, and I admit I don't have a good solution here.

-- 
				Petr "Pasky" Baudis
The next generation of interesting software will be done
on the Macintosh, not the IBM PC.  -- Bill Gates
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux