Skip to content

Commit bfd1559

Browse files
peffgitster
authored andcommitted
cat-file: move batch_options definition to top of file
That way all of the functions can make use of it. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent ad42f28 commit bfd1559

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

builtin/cat-file.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@
1010
#include "streaming.h"
1111
#include "tree-walk.h"
1212

13+
struct batch_options {
14+
int enabled;
15+
int follow_symlinks;
16+
int print_contents;
17+
const char *format;
18+
};
19+
1320
static int cat_one_file(int opt, const char *exp_type, const char *obj_name,
1421
int unknown_type)
1522
{
@@ -232,12 +239,6 @@ static void print_object_or_die(int fd, struct expand_data *data)
232239
}
233240
}
234241

235-
struct batch_options {
236-
int enabled;
237-
int follow_symlinks;
238-
int print_contents;
239-
const char *format;
240-
};
241242

242243
static int batch_one_object(const char *obj_name, struct batch_options *opt,
243244
struct expand_data *data)

0 commit comments

Comments
 (0)