summaryrefslogtreecommitdiff
path: root/builtin/log.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-11-18 21:32:52 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-11-18 21:32:52 (GMT)
commitf8a1cee7b38ef3125ce69dad24af41746a0722a0 (patch)
tree5f7c28593053ec30766bb6606b6945c6217d0124 /builtin/log.c
parent30f5257611f80dc36bc6f15bdd6228ec094c2087 (diff)
parent39664cb0aca42f240468ddf84fe75df4172ab63f (diff)
downloadgit-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.c3
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);