summaryrefslogtreecommitdiff
path: root/builtin-tar-tree.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-09-09 22:42:02 -0700
committerJunio C Hamano <junkio@cox.net>2006-09-10 13:39:25 -0700
commite0ffb24877d4530208905512f7c91dd8d71e2c95 (patch)
treedf9d8046b159c0b2418e2a04c9eacb007517a936 /builtin-tar-tree.c
parent8142f603b9955648228549d2e83ace7fbe834114 (diff)
downloadgit-e0ffb24877d4530208905512f7c91dd8d71e2c95.tar.gz
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 e8e492fa0f..f2679a8637 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);