From 63ca1c099c36e61b0e9cd7fa0b912c0b9d89b628 Mon Sep 17 00:00:00 2001 From: Alexander Kuleshov Date: Mon, 22 Feb 2016 13:18:29 +0600 Subject: 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 Helped-by: Jeff King Signed-off-by: Junio C Hamano --- git-compat-util.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'git-compat-util.h') diff --git a/git-compat-util.h b/git-compat-util.h index f649e81f11..b7fcbd4b86 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) { -- cgit v1.2.1