summaryrefslogtreecommitdiff
path: root/builtin/cat-file.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2015-06-22 10:41:03 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-06-22 21:55:52 (GMT)
commitbfd155943eecedb7b7e759ff022ca09e68f941b0 (patch)
treea11996c7f3d6a5c2640ba69866e3e51ba239f7fc /builtin/cat-file.c
parentad42f28d0cc72676de8ff8439c513125a1aa9e84 (diff)
downloadgit-bfd155943eecedb7b7e759ff022ca09e68f941b0.zip
git-bfd155943eecedb7b7e759ff022ca09e68f941b0.tar.gz
git-bfd155943eecedb7b7e759ff022ca09e68f941b0.tar.bz2
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>
Diffstat (limited to 'builtin/cat-file.c')
-rw-r--r--builtin/cat-file.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/builtin/cat-file.c b/builtin/cat-file.c
index 6cbcccc..d4101b7 100644
--- a/builtin/cat-file.c
+++ b/builtin/cat-file.c
@@ -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)
{
@@ -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)