[PATCH] diff-no-index: correctly diagnose error return from diff_opt_parse()

2014-03-31 Thread Junio C Hamano
diff_opt_parse() returns the number of options parsed, or often returns error() which is defined to return -1. Yes, return value of 0 is I did not process that option at all, which should cause the caller to say that, but negative return should not be forgotten. This bug the caused it to

Re: [PATCH] diff-no-index: correctly diagnose error return from diff_opt_parse()

2014-03-31 Thread Linus Torvalds
On Mon, Mar 31, 2014 at 11:47 AM, Junio C Hamano gits...@pobox.com wrote: Instead, make it act like so: $ git diff --no-index --color=words a b error: option `color' expects always, auto, or never fatal: invalid diff option/value: --color=words Thanks,