summaryrefslogtreecommitdiffstats
path: root/shell.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-12-06 15:09:22 -0800
committerJunio C Hamano <gitster@pobox.com>2019-12-06 15:09:22 -0800
commit391fb22ac760042fd1cffe451f4ec9a4eb57e39e (patch)
treea933c90fefc73a2e6625ceec79043330b870c128 /shell.c
parent92b52e1bd64b048beba44abae8a72b7ebebd9529 (diff)
parent2059e79c0dac1e1e4e55733618dc6ca9d00b8aa4 (diff)
downloadgit-391fb22ac760042fd1cffe451f4ec9a4eb57e39e.tar.gz
git-391fb22ac760042fd1cffe451f4ec9a4eb57e39e.zip
Merge branch 'rs/use-skip-prefix-more'
Code cleanup. * rs/use-skip-prefix-more: name-rev: use skip_prefix() instead of starts_with() push: use skip_prefix() instead of starts_with() shell: use skip_prefix() instead of starts_with() fmt-merge-msg: use skip_prefix() instead of starts_with() fetch: use skip_prefix() instead of starts_with()
Diffstat (limited to 'shell.c')
-rw-r--r--shell.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/shell.c b/shell.c
index 40084a3013..54cca7439d 100644
--- a/shell.c
+++ b/shell.c
@@ -16,10 +16,10 @@ static int do_generic_cmd(const char *me, char *arg)
setup_path();
if (!arg || !(arg = sq_dequote(arg)) || *arg == '-')
die("bad argument");
- if (!starts_with(me, "git-"))
+ if (!skip_prefix(me, "git-", &me))
die("bad command");
- my_argv[0] = me + 4;
+ my_argv[0] = me;
my_argv[1] = arg;
my_argv[2] = NULL;