Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-10-20 01:38:06 +0300
committerJunio C Hamano <gitster@pobox.com>2022-10-20 01:38:06 +0300
commitfe9c607509430b52ec107134f2d8e5d201bcf5bc (patch)
tree4ad5ebbe305ee827c2fc1dc507c640d81bb282e7 /archive.c
parent179eb1d96745bac14cbbb7062c88e4a21c06df0b (diff)
parente3733b646dcec33947aa4658c0ed89a8a4b42c4b (diff)
Merge branch 'rs/archive-dedup-printf'
Code simplification. * rs/archive-dedup-printf: archive: deduplicate verbose printing
Diffstat (limited to 'archive.c')
-rw-r--r--archive.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/archive.c b/archive.c
index 61a79e4a22..cc1087262f 100644
--- a/archive.c
+++ b/archive.c
@@ -166,18 +166,16 @@ static int write_archive_entry(const struct object_id *oid, const char *base,
args->convert = check_attr_export_subst(check);
}
+ if (args->verbose)
+ fprintf(stderr, "%.*s\n", (int)path.len, path.buf);
+
if (S_ISDIR(mode) || S_ISGITLINK(mode)) {
- if (args->verbose)
- fprintf(stderr, "%.*s\n", (int)path.len, path.buf);
err = write_entry(args, oid, path.buf, path.len, mode, NULL, 0);
if (err)
return err;
return (S_ISDIR(mode) ? READ_TREE_RECURSIVE : 0);
}
- if (args->verbose)
- fprintf(stderr, "%.*s\n", (int)path.len, path.buf);
-
/* Stream it? */
if (S_ISREG(mode) && !args->convert &&
oid_object_info(args->repo, oid, &size) == OBJ_BLOB &&