diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-11-18 21:32:52 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-11-18 21:32:52 (GMT) |
commit | f8a1cee7b38ef3125ce69dad24af41746a0722a0 (patch) | |
tree | 5f7c28593053ec30766bb6606b6945c6217d0124 /builtin/log.c | |
parent | 30f5257611f80dc36bc6f15bdd6228ec094c2087 (diff) | |
parent | 39664cb0aca42f240468ddf84fe75df4172ab63f (diff) | |
download | git-f8a1cee7b38ef3125ce69dad24af41746a0722a0.zip git-f8a1cee7b38ef3125ce69dad24af41746a0722a0.tar.gz git-f8a1cee7b38ef3125ce69dad24af41746a0722a0.tar.bz2 |
Merge branch 'jc/line-log-takes-no-pathspec'
"git log -L<range>:<path>" is documented to take no pathspec, but
this was not enforced by the command line option parser, which has
been corrected.
* jc/line-log-takes-no-pathspec:
log: diagnose -L used with pathspec as an error
Diffstat (limited to 'builtin/log.c')
-rw-r--r-- | builtin/log.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/builtin/log.c b/builtin/log.c index 9f939e6..9fd49fa 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -206,6 +206,9 @@ static void cmd_log_init_finish(int argc, const char **argv, const char *prefix, if (argc > 1) die(_("unrecognized argument: %s"), argv[1]); + if (rev->line_level_traverse && rev->prune_data.nr) + die(_("-L<range>:<file> cannot be used with pathspec")); + memset(&w, 0, sizeof(w)); userformat_find_requirements(NULL, &w); |