commit | b48158ac94cf725834b70b4a5ab7f2d152a741d4 | [log] [tgz] |
---|---|---|
author | Karthik Nayak <karthik.188@gmail.com> | Sun May 03 20:00:00 2015 +0530 |
committer | Junio C Hamano <gitster@pobox.com> | Wed May 06 13:35:48 2015 -0700 |
tree | 3ab282155912445dc9136345d661d441b3f94131 | |
parent | 46f034483eb9f88cf79cba8b76f085464287fc58 [diff] |
cat-file: make the options mutually exclusive 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>