From: Junio C Hamano Date: Mon, 16 Jun 2014 17:07:09 +0000 (-0700) Subject: Merge branch 'jk/diff-follow-must-take-one-pathspec' X-Git-Tag: v2.1.0-rc0~126 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/b0e2c999af7aa69a0b8d9677107d4c09938e528a Merge branch 'jk/diff-follow-must-take-one-pathspec' * jk/diff-follow-must-take-one-pathspec: move "--follow needs one pathspec" rule to diff_setup_done --- b0e2c999af7aa69a0b8d9677107d4c09938e528a diff --cc diff.c index f66716fab4,a99b925ac7..de25819e4e --- a/diff.c +++ b/diff.c @@@ -3319,7 -3318,8 +3319,10 @@@ void diff_setup_done(struct diff_option DIFF_OPT_SET(options, EXIT_WITH_STATUS); } + options->diff_path_counter = 0; ++ + if (DIFF_OPT_TST(options, FOLLOW_RENAMES) && options->pathspec.nr != 1) + die(_("--follow requires exactly one pathspec")); } static int opt_arg(const char *arg, int arg_short, const char *arg_long, int *val)