git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 2.8.0 gitignore enhancement not working as expected
@ 2016-03-18  9:31 Richard Furness -X (rfurness - ENSOFT LIMITED at Cisco)
  2016-03-18 11:19 ` Duy Nguyen
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Furness -X (rfurness - ENSOFT LIMITED at Cisco) @ 2016-03-18  9:31 UTC (permalink / raw)
  To: git@vger.kernel.org

Hi,

I've been testing out git 2.8.0 rc3 due to having a particular interest in this enhancement from the changelog:
" Another try to improve the ignore mechanism that lets you say "this
   is excluded" and then later say "oh, no, this part (that is a
   subset of the previous part) is not excluded".  This has still a
   known limitation, though."

Currently, in order to include ONLY the files under a/b/c I have the following in .gitignore:
/*             - Ignore everything
!/a             - Except directory "a"
/a/*            - Ignore all sub-directories of "a/"
!/a/b           - Except "a/b"
/a/b/*          - Ignore all sub-directories of "a/b/"
!/a/b/c         - Except "a/b/c"

My hope was that with this enhancement I could massively simplify this to:
/*             - Ignore everything
!a/b/c      - Except "a/b/c"

However this doesn't seem to work - instead I find that NOTHING is ignored (i.e. it's as if the 2nd line completely cancels the first).

Is this a bug or am I mis-understanding what the enhancement does? Or is this the known limitation referred to?

Thanks,

Richard

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-03-18 15:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-18  9:31 2.8.0 gitignore enhancement not working as expected Richard Furness -X (rfurness - ENSOFT LIMITED at Cisco)
2016-03-18 11:19 ` Duy Nguyen
2016-03-18 14:32   ` Richard Furness -X (rfurness - ENSOFT LIMITED at Cisco)
2016-03-18 14:52     ` Duy Nguyen
2016-03-18 15:33       ` Richard Furness -X (rfurness - ENSOFT LIMITED at Cisco)

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).