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>
This commit is contained in:
René Scharfe
2008-06-08 18:42:33 +02:00
committed by Junio C Hamano
parent 457bb45291
commit 008d896df5
6 changed files with 33 additions and 0 deletions

View File

@ -247,6 +247,8 @@ static int write_tar_entry(const unsigned char *sha1,
strbuf_grow(&path, PATH_MAX);
strbuf_add(&path, base, baselen);
strbuf_addstr(&path, filename);
if (is_archive_path_ignored(path.buf + base_len))
return 0;
if (S_ISDIR(mode) || S_ISGITLINK(mode)) {
strbuf_addch(&path, '/');
buffer = NULL;