summaryrefslogtreecommitdiff
path: root/git-compat-util.h
diff options
context:
space:
mode:
authorJohannes Sixt <johannes.sixt@telecom.at>2007-12-08 20:57:25 +0100
committerJohannes Sixt <johannes.sixt@telecom.at>2008-06-23 13:34:55 +0200
commit23326d14edbd16469453f6c3ecdd98ab90e6efb7 (patch)
tree0c2c562c5338e53dd9c05defe26016c3165b0a1c /git-compat-util.h
parent8385abfda533819be9fbec436230ccd7be4bcda8 (diff)
downloadgit-23326d14edbd16469453f6c3ecdd98ab90e6efb7.tar.gz
Windows: Strip ".exe" from the program name.
Before we can successfully parse a builtin command from the program name we must strip off unneeded parts, that is, the file extension. Furthermore, we must take Windows style path names into account when we parse the program name. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Diffstat (limited to 'git-compat-util.h')
-rw-r--r--git-compat-util.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/git-compat-util.h b/git-compat-util.h
index ab762c79ee..a9a85be89d 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -114,6 +114,10 @@
#define PATH_SEP ':'
#endif
+#ifndef STRIP_EXTENSION
+#define STRIP_EXTENSION ""
+#endif
+
#ifndef has_dos_drive_prefix
#define has_dos_drive_prefix(path) 0
#endif