diff -ru src/namespace_def.cpp.org src/namespace_def.cpp
--- src/namespace_def.cpp.org 2008-03-21 03:19:30.000000000 +0100
+++ src/namespace_def.cpp 2008-10-11 17:11:09.000000000 +0200
@@ -51,6 +51,33 @@
}
}
+#elif defined(Q_OS_MACX) // MacOS X specific code
+
+#include <sys/types.h> // used by chmod()
+#include <sys/stat.h> // used by chmod()
+
+const QString QGit::SCRIPT_EXT = ".sh";
+
+static void adjustPath(QStringList& args, bool*) {
+/*
+ Under MacOS X, git typically doesn't live in the PATH
+ So use GIT_DIR from the settings if available
+
+ Note: I (OC) think that this should be the default behaviour,
+ but I don't want to break other platforms, so I introduced
+ the MacOS X special case. Feel free to make this the default if
+ you do feel the same.
+*/
+ if (args.first() == "git" || args.first().startsWith("git-")) {
+
+ if (!QGit::GIT_DIR.isEmpty()) // application built from sources
+ args.first().prepend(QGit::GIT_DIR + '/');
+
+ }
+}
+
+
+
#else
#include <sys/types.h> // used by chmod()