projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'mz/pick-unborn' into maint
[git.git]
/
archive.c
diff --git
a/archive.c
b/archive.c
index 466640479ecb332d8d06f6f26254023eb6e22c85..93e00bb4ae8ff9637be9e55fd41536b8837c3ba2 100644
(file)
--- a/
archive.c
+++ b/
archive.c
@@
-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);
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);
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)) {
}
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);
if (args->verbose)
fprintf(stderr, "%.*s\n", (int)path.len, path.buf);
err = write_entry(args, sha1, path.buf, path.len, mode);