diff options
| author | Junio C Hamano <gitster@pobox.com> | 2013-01-11 16:46:46 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2013-01-11 16:46:46 -0800 |
| commit | 22fd1c84100b4c26328a8ad0c044cce2aaf8e130 (patch) | |
| tree | af4ccfc04521d42c26bb64783ab7cd5b7b70c173 /archive.c | |
| parent | c039f35b8af8c0e7a29f8d9403c020497ed40f67 (diff) | |
| parent | 94bc671a1f2e8610de475c2494d2763355a99f65 (diff) | |
Merge branch 'ja/directory-attrs' into maint
The attribute mechanism didn't allow limiting attributes to be
applied to only a single directory itself with "path/" like the
exclude mechanism does.
* ja/directory-attrs:
Add directory pattern matching to attributes
Diffstat (limited to 'archive.c')
| -rw-r--r-- | archive.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -120,6 +120,8 @@ static int write_archive_entry(const unsigned char *sha1, const char *base, strbuf_add(&path, args->base, args->baselen); strbuf_add(&path, base, baselen); strbuf_addstr(&path, filename); + if (S_ISDIR(mode) || S_ISGITLINK(mode)) + strbuf_addch(&path, '/'); path_without_prefix = path.buf + args->baselen; setup_archive_check(check); @@ -130,7 +132,6 @@ static int write_archive_entry(const unsigned char *sha1, const char *base, } if (S_ISDIR(mode) || S_ISGITLINK(mode)) { - strbuf_addch(&path, '/'); if (args->verbose) fprintf(stderr, "%.*s\n", (int)path.len, path.buf); err = write_entry(args, sha1, path.buf, path.len, mode); |
