diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-12-17 23:47:35 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-12-18 00:02:44 +0400 |
commit | ad7044857660af7ffaaf8fbbccc77b817d1b938f (patch) | |
tree | b77a7390dbbc1901e13d74c1738f327e5fa8154d /shell.c | |
parent | 14a9c5f261bcc436b80700076257f02af0beec68 (diff) | |
parent | 59556548230e617b837343c2c07e357e688e2ca4 (diff) |
Merge branch 'cc/starts-n-ends-with'
Remove a few duplicate implementations of prefix/suffix comparison
functions, and rename them to starts_with and ends_with.
* cc/starts-n-ends-with:
replace {pre,suf}fixcmp() with {starts,ends}_with()
strbuf: introduce starts_with() and ends_with()
builtin/remote: remove postfixcmp() and use suffixcmp() instead
environment: normalize use of prefixcmp() by removing " != 0"
Diffstat (limited to 'shell.c')
-rw-r--r-- | shell.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -15,7 +15,7 @@ static int do_generic_cmd(const char *me, char *arg) setup_path(); if (!arg || !(arg = sq_dequote(arg))) die("bad argument"); - if (prefixcmp(me, "git-")) + if (!starts_with(me, "git-")) die("bad command"); my_argv[0] = me + 4; |