Skip to content

Commit 40d2f93

Browse files
committed
Merge branch 'rs/archive-dedup-printf' into maint-2.38
Code simplification. * rs/archive-dedup-printf: archive: deduplicate verbose printing
2 parents 4532cd8 + e3733b6 commit 40d2f93

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

archive.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,18 +166,16 @@ static int write_archive_entry(const struct object_id *oid, const char *base,
166166
args->convert = check_attr_export_subst(check);
167167
}
168168

169+
if (args->verbose)
170+
fprintf(stderr, "%.*s\n", (int)path.len, path.buf);
171+
169172
if (S_ISDIR(mode) || S_ISGITLINK(mode)) {
170-
if (args->verbose)
171-
fprintf(stderr, "%.*s\n", (int)path.len, path.buf);
172173
err = write_entry(args, oid, path.buf, path.len, mode, NULL, 0);
173174
if (err)
174175
return err;
175176
return (S_ISDIR(mode) ? READ_TREE_RECURSIVE : 0);
176177
}
177178

178-
if (args->verbose)
179-
fprintf(stderr, "%.*s\n", (int)path.len, path.buf);
180-
181179
/* Stream it? */
182180
if (S_ISREG(mode) && !args->convert &&
183181
oid_object_info(args->repo, oid, &size) == OBJ_BLOB &&

0 commit comments

Comments
 (0)