git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: M Lewis <picevio@gmail.com>
To: git@vger.kernel.org, picevio <picevio@gmail.com>
Subject: GitAttributes feature export-ignore works, but -export-ignore (with dash) should also work
Date: Wed, 20 Nov 2019 08:44:52 -0800	[thread overview]
Message-ID: <01e0a4ab-d809-d968-5671-b731438c2bc4@gmail.com> (raw)

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


             reply	other threads:[~2019-11-20 16:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-20 16:44 M Lewis [this message]
2019-11-21  7:58 ` GitAttributes feature export-ignore works, but -export-ignore (with dash) should also work 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

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=01e0a4ab-d809-d968-5671-b731438c2bc4@gmail.com \
    --to=picevio@gmail.com \
    --cc=git@vger.kernel.org \
    /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).