summaryrefslogtreecommitdiff
path: root/commit.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2022-11-27 01:18:52 +0000
committerJunio C Hamano <gitster@pobox.com>2022-11-27 10:49:51 +0900
commit64685cb85566c1b0fb288690a300978d3c035431 (patch)
treefe58835e03485a43c03fb0e511fb289b5eca303a /commit.c
parentcfb7b3b39183e9711340ee464e58199f44e0de4e (diff)
git-jump: move valid-mode check earlier
We check if the "mode" argument supplied by the user is valid by seeing if we have a mode_$mode function defined. But we don't do that until after creating the tempfile. This is wasteful (we create a tempfile but never use it), and makes it harder to add new options (the recent stdout option exits before creating the tempfile, so it misses the check and "git jump --stdout foo" will produce "git-jump: 92: mode_foo: not found" rather than the regular usage message). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.c')
0 files changed, 0 insertions, 0 deletions