summaryrefslogtreecommitdiff
path: root/builtin-tar-tree.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-09-10 05:42:02 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-09-10 20:39:25 (GMT)
commite0ffb24877d4530208905512f7c91dd8d71e2c95 (patch)
treedf9d8046b159c0b2418e2a04c9eacb007517a936 /builtin-tar-tree.c
parent8142f603b9955648228549d2e83ace7fbe834114 (diff)
downloadgit-e0ffb24877d4530208905512f7c91dd8d71e2c95.zip
git-e0ffb24877d4530208905512f7c91dd8d71e2c95.tar.gz
git-e0ffb24877d4530208905512f7c91dd8d71e2c95.tar.bz2
Add --verbose to git-archive
And teach backends about it. Signed-off-by: Junio C Hamano <junkio@cox.net> (cherry picked from 9e2c44a2893ae90944a0b7c9f40a9d22b759b5c0 commit)
Diffstat (limited to 'builtin-tar-tree.c')
-rw-r--r--builtin-tar-tree.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/builtin-tar-tree.c b/builtin-tar-tree.c
index e8e492f..f2679a8 100644
--- a/builtin-tar-tree.c
+++ b/builtin-tar-tree.c
@@ -22,6 +22,7 @@ static unsigned long offset;
static time_t archive_time;
static int tar_umask;
+static int verbose;
/* writes out the whole block, but only if it is full */
static void write_if_needed(void)
@@ -169,6 +170,8 @@ static void write_entry(const unsigned char *sha1, struct strbuf *path,
mode = 0100666;
sprintf(header.name, "%s.paxheader", sha1_to_hex(sha1));
} else {
+ if (verbose)
+ fprintf(stderr, "%.*s\n", path->len, path->buf);
if (S_ISDIR(mode)) {
*header.typeflag = TYPEFLAG_DIR;
mode = (mode | 0777) & ~tar_umask;
@@ -385,6 +388,7 @@ int write_tar_archive(struct archiver_args *args)
git_config(git_tar_config);
archive_time = args->time;
+ verbose = args->verbose;
if (args->commit_sha1)
write_global_extended_header(args->commit_sha1);