diff options
| author | Junio C Hamano <gitster@pobox.com> | 2019-12-06 15:09:22 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2019-12-06 15:09:22 -0800 |
| commit | 391fb22ac760042fd1cffe451f4ec9a4eb57e39e (patch) | |
| tree | a933c90fefc73a2e6625ceec79043330b870c128 /shell.c | |
| parent | 92b52e1bd64b048beba44abae8a72b7ebebd9529 (diff) | |
| parent | 2059e79c0dac1e1e4e55733618dc6ca9d00b8aa4 (diff) | |
| download | git-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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |
