summaryrefslogtreecommitdiff
path: root/git-compat-util.h
diff options
context:
space:
mode:
authorJohannes Sixt <johannes.sixt@telecom.at>2007-12-08 19:57:25 (GMT)
committerJohannes Sixt <johannes.sixt@telecom.at>2008-06-23 11:34:55 (GMT)
commit23326d14edbd16469453f6c3ecdd98ab90e6efb7 (patch)
tree0c2c562c5338e53dd9c05defe26016c3165b0a1c /git-compat-util.h
parent8385abfda533819be9fbec436230ccd7be4bcda8 (diff)
downloadgit-23326d14edbd16469453f6c3ecdd98ab90e6efb7.zip
git-23326d14edbd16469453f6c3ecdd98ab90e6efb7.tar.gz
git-23326d14edbd16469453f6c3ecdd98ab90e6efb7.tar.bz2
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 ab762c7..a9a85be 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