git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* GitAttributes feature export-ignore works, but -export-ignore (with dash) should also work
@ 2019-11-20 16:44 M Lewis
  2019-11-21  7:58 ` Jeff King
  0 siblings, 1 reply; 6+ messages in thread
From: M Lewis @ 2019-11-20 16:44 UTC (permalink / raw)
  To: git, picevio

When running 'git archive', the .gitattributes file is used to determine 
paths that should be ignored when building the archive by using 
'export-ignore'.
But it would be useful to include certain sub-paths in the ignored path.

For example, say I have folders like these
     /all_useful                  # this entire sub directory is needed 
in the archive
     /mostly_unuseful             # there are many sub directories in 
here to ignore
/mostly_unuseful/needed_a    # but these specific sub directories are 
desired in the archive
/mostly_unuseful/needed_b

The git-attribute document says a dash '-' prefix should unset the 
attribute. It should work with 'export-ignore'

So if I want for example '/mostly_unuseful/needed_a' in my archive, I 
should be able to specify that
in my .gitattributes file like this:


     /mostly_unuseful                  export-ignore # do not archive
/mostly_unuseful/needed_a -export-ignore # do add to archive
/mostly_unuseful/needed_b    -export-ignore # do add to archive

Thank you


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

end of thread, other threads:[~2019-11-22  6:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-20 16:44 GitAttributes feature export-ignore works, but -export-ignore (with dash) should also work M Lewis
2019-11-21  7:58 ` Jeff King
2019-11-21 13:29   ` Junio C Hamano
2019-11-22  6:59     ` Jeff King
2019-11-21 15:45   ` M Lewis
2019-11-22  6:54     ` Jeff King

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).