diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-11-18 13:32:52 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-11-18 13:32:52 -0800 |
commit | f8a1cee7b38ef3125ce69dad24af41746a0722a0 (patch) | |
tree | 5f7c28593053ec30766bb6606b6945c6217d0124 /builtin | |
parent | Merge branch 'rs/empty-reflog-check-fix' (diff) | |
parent | log: diagnose -L used with pathspec as an error (diff) | |
download | tgif-f8a1cee7b38ef3125ce69dad24af41746a0722a0.tar.xz |
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')
-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 9f939e6cdf..9fd49fa914 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); |