cat-file: refactor --batch option parsing
commitb71bd48017981f7257d8c0a5096825321b4fb49b
authorJeff King <peff@peff.net>
Wed, 10 Jul 2013 11:38:58 +0000 (10 07:38 -0400)
committerJunio C Hamano <gitster@pobox.com>
Thu, 11 Jul 2013 17:39:13 +0000 (11 10:39 -0700)
tree72a826b14104a16a346e7e9b9e59c161ddc3d040
parent98e2092b5027fde9dbe68cb49a196ad2184c02c3
cat-file: refactor --batch option parsing

We currently use an int to tell us whether --batch parsing
is on, and if so, whether we should print the full object
contents. Let's instead factor this into a struct, filled in
by callback, which will make further batch-related options
easy to add.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/cat-file.c