diff options
author | René Scharfe <rene.scharfe@lsrfire.ath.cx> | 2008-06-08 18:42:33 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-06-09 14:53:46 -0700 |
commit | 008d896df5deaa967d4d86306b408333e8ef34c3 (patch) | |
tree | c2b7aeaa45767e1c4e6359381b2bd99bd77dbebc /archive.c | |
parent | 457bb452919887ff5e8007d02e93f443fdb6f1e9 (diff) | |
download | git-008d896df5deaa967d4d86306b408333e8ef34c3.tar.gz |
Teach new attribute 'export-ignore' to git-archive
Paths marked with this attribute are not output to git-archive
output.
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'archive.c')
-rw-r--r-- | archive.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -82,3 +82,16 @@ void *sha1_file_to_archive(const char *path, const unsigned char *sha1, return buffer; } +int is_archive_path_ignored(const char *path) +{ + static struct git_attr *attr_export_ignore; + struct git_attr_check check[1]; + + if (!attr_export_ignore) + attr_export_ignore = git_attr("export-ignore", 13); + + check[0].attr = attr_export_ignore; + if (git_checkattr(path, ARRAY_SIZE(check), check)) + return 0; + return ATTR_TRUE(check[0].value); +} |