cat-file: make the options mutually exclusive
authorKarthik Nayak <karthik.188@gmail.com>
Sun, 3 May 2015 14:30:00 +0000 (20:00 +0530)
committerJunio C Hamano <gitster@pobox.com>
Wed, 6 May 2015 20:35:48 +0000 (13:35 -0700)
We only parse the options if 2 or 3 arguments are specified.
Update 'struct option options[]' to use OPT_CMDMODE rather than
OPT_SET_INT to allow only one mutually exclusive option and avoid the
need for checking number of arguments. This was written by Junio C Hamano,
tested by me.

Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
No differences found