summaryrefslogtreecommitdiff
path: root/git-compat-util.h
diff options
context:
space:
mode:
authorAlexander Kuleshov <kuleshovmail@gmail.com>2016-02-22 07:18:29 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-02-22 07:52:43 (GMT)
commit63ca1c099c36e61b0e9cd7fa0b912c0b9d89b628 (patch)
tree266daafe353b62f988436638e69fdeea41824862 /git-compat-util.h
parentbe08dee9738eaaa0423885ed189c2b6ad8368cf0 (diff)
downloadgit-63ca1c099c36e61b0e9cd7fa0b912c0b9d89b628.zip
git-63ca1c099c36e61b0e9cd7fa0b912c0b9d89b628.tar.gz
git-63ca1c099c36e61b0e9cd7fa0b912c0b9d89b628.tar.bz2
git.c: simplify stripping extension of a file in handle_builtin()
The handle_builtin() starts from stripping of command extension if STRIP_EXTENSION is enabled. Actually STRIP_EXTENSION does not used anywhere else. This patch introduces strip_extension() helper to strip STRIP_EXTENSION extension from argv[0] with the strip_suffix() instead of manually stripping. Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com> Helped-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-compat-util.h')
-rw-r--r--git-compat-util.h4
1 files changed, 0 insertions, 4 deletions
diff --git a/git-compat-util.h b/git-compat-util.h
index f649e81..b7fcbd4 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -319,10 +319,6 @@ extern char *gitbasename(char *);
#define _PATH_DEFPATH "/usr/local/bin:/usr/bin:/bin"
#endif
-#ifndef STRIP_EXTENSION
-#define STRIP_EXTENSION ""
-#endif
-
#ifndef has_dos_drive_prefix
static inline int git_has_dos_drive_prefix(const char *path)
{