summaryrefslogtreecommitdiff
path: root/builtin/commit.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2023-06-01 13:41:06 -0400
committerJunio C Hamano <gitster@pobox.com>2023-06-03 10:34:25 +0900
commit9eac5954e81037f282ace2efff7110af3440dc19 (patch)
treeea75389ce1c5dad909ab1488171bfdf7f9ff0f48 /builtin/commit.c
parent8e32caaa783a3a6b1d94834ee6e2d21ac36ff39f (diff)
diff: factor out --follow pathspec check
In --follow mode, we require exactly one pathspec. We check this condition in two places: - in diff_setup_done(), we complain if --follow is used with an inapropriate pathspec - in git-log's revision "tweak" function, we enable log.follow only if the pathspec allows it The duplication isn't a big deal right now, since the logic is so simple. But in preparation for it becoming more complex, let's pull it into a shared function. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit.c')
0 files changed, 0 insertions, 0 deletions