git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Larres <jan@majutsushi.net>
To: git@vger.kernel.org
Subject: check-attr doesn't respect recursive definitions
Date: Sat, 30 Mar 2013 09:45:51 +0000 (UTC)	[thread overview]
Message-ID: <slrnkldd3g.1l4.jan@majutsushi.net> (raw)

Hi,

I am trying to write a custom archiving script that checks the
export-ignore attribute to know which files from an ls-files output it
should skip. Through this I noticed that for files in directories for
which the export-ignore (or any other) attribute is set, check-attr
still reports 'unspecified'. More precisely:

$ git init test
Initialized empty Git repository in /home/jan/test/.git/
$ cd test
$ mkdir foo
$ touch foo/bar
$ echo "foo export-ignore" > .gitattributes
$ git check-attr export-ignore foo
foo: export-ignore: set
$ git check-attr export-ignore foo/bar
foo/bar: export-ignore: unspecified

I would expect the last command to also report 'set'. I've also tried
other patterns like 'foo/' and 'foo*', but it didn't make any
difference. Is this expected behaviour? It does make checking the
attributes of single files somewhat more difficult.

git-archive ignores the directory as expected, but unfortunately it
doesn't have an option to just list the files it would archive instead
of actually archiving them.

This is with git version 1.7.10.4.

-Jan

             reply	other threads:[~2013-03-30 10:15 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-30  9:45 Jan Larres [this message]
2013-04-02 14:31 ` check-attr doesn't respect recursive definitions Jeff King
2013-04-02 14:48   ` Jeff King
2013-04-02 16:11   ` Junio C Hamano
2013-04-02 16:30     ` Jeff King
2013-04-02 16:43       ` Junio C Hamano
2013-04-02 16:51         ` Jeff King
2013-04-02 17:15           ` Jeff King
2013-04-02 17:16           ` Junio C Hamano
2013-04-02 19:16             ` Jeff King
2013-04-03 10:05               ` Jan Larres
2013-04-05  2:09 ` Duy Nguyen
2013-04-05 12:04   ` Jan Larres

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=slrnkldd3g.1l4.jan@majutsushi.net \
    --to=jan@majutsushi.net \
    --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).