Skip to content

Commit ee02ac6

Browse files
adlternativegitster
authored andcommitted
cat-file: merge two block into one
There are two "if (opt->all_objects)" blocks next to each other, merge them into one to provide better readability. Helped-by: Jeff King <[email protected]> Signed-off-by: ZheNing Hu <[email protected]> Acked-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e16acc8 commit ee02ac6

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

builtin/cat-file.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -520,14 +520,11 @@ static int batch_objects(struct batch_options *opt)
520520
data.info.typep = &data.type;
521521

522522
if (opt->all_objects) {
523+
struct object_cb_data cb;
523524
struct object_info empty = OBJECT_INFO_INIT;
524525

525526
if (!memcmp(&data.info, &empty, sizeof(empty)))
526527
data.skip_object_info = 1;
527-
}
528-
529-
if (opt->all_objects) {
530-
struct object_cb_data cb;
531528

532529
if (has_promisor_remote())
533530
warning("This repository uses promisor remotes. Some objects may not be loaded.");

0 commit comments

Comments
 (0)