Re: [PATCH] Add git format-patch produced patches to .gitignore

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

 



Michael J Gruber wrote:

> If you want to ignore format patch output, simply use .git/info/excludes
> or a global excludes file, but please don't force everyone else to live
> with that or work around it.

Side note: I said with similar intent that this allows developers to
work “without interference”.  This was a poor choice of words on my
part: a too-long .gitignore only prevents me from noticing and
tracking files that others considered not worth tracking.

>From the thread I faintly remembered and then linked to[1]: ;-)

  I earlier said that "*~" should not be in project-wide .gitignore
  file because use of Emacs vs vi is a matter of personal taste, and
  Emacs specific "*~" pattern does not belong to a project policy,
  just like vim "*.swp" pattern doesn't.

  But I think that reasoning is flawed.  The right criteria should not
  be about "use of Emacs vs vi", but about "do we in this project ever
  want to track files that match *~ or *.swp as legitimate contents".
  If a project expects not to have a tracked file whose name ends with
  ".swp", even if it does _not_ mean to encourage use of vim over
  Emacs or any other editor, I think it is fine to add such to its
  tracked .gitignore file for its developer's benefit.

This does not change my conclusion: there are many other reasons to
leave files produced outside the build process unlisted:

 . consistency: to keep the file intuitive and avoid a lot of
   patch churn, it is nicest to choose one rule and stick to it

 . simplicity: shorter .gitignore.  Making the appropriate content
   of .gitignore depend on the behavior of too many text editors
   (and IDEs, and foreign VCSes, and debugging tools, and ...)
   makes it hard to maintain.  See qt’s .gitignore for an example
   of this.

 . correctness: for the case of format-patch, it is hard to say
   "we will never want to track files that match ????-*.patch as
   legitimate contents".  In fact, it is likely such files may need
   to be added to the test suite.

And unlike .o files and company, it does not seem likely that
formatted patches need to be kept around during development.

I hope that is a little clearer.  Sorry for the ramble.
Jonathan

[1] http://thread.gmane.org/gmane.comp.version-control.git/96220/focus=96294
--
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]