Skip to content

Commit

Permalink
cat-file: move batch_options definition to top of file
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jeff King authored and Junio C Hamano committed Jun 22, 2015
1 parent ad42f28 commit bfd1559
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions builtin/cat-file.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@
#include "streaming.h"
#include "tree-walk.h"

struct batch_options {
int enabled;
int follow_symlinks;
int print_contents;
const char *format;
};

static int cat_one_file(int opt, const char *exp_type, const char *obj_name,
int unknown_type)
{
Expand Down Expand Up @@ -232,12 +239,6 @@ static void print_object_or_die(int fd, struct expand_data *data)
}
}

struct batch_options {
int enabled;
int follow_symlinks;
int print_contents;
const char *format;
};

static int batch_one_object(const char *obj_name, struct batch_options *opt,
struct expand_data *data)
Expand Down

0 comments on commit bfd1559

Please sign in to comment.