diff -ru src/namespace_def.cpp.org src/namespace_def.cpp
old
|
new
|
|
51 | 51 | } |
52 | 52 | } |
53 | 53 | |
| 54 | #elif defined(Q_OS_MACX) // MacOS X specific code |
| 55 | |
| 56 | #include <sys/types.h> // used by chmod() |
| 57 | #include <sys/stat.h> // used by chmod() |
| 58 | |
| 59 | const QString QGit::SCRIPT_EXT = ".sh"; |
| 60 | |
| 61 | static void adjustPath(QStringList& args, bool*) { |
| 62 | /* |
| 63 | Under MacOS X, git typically doesn't live in the PATH |
| 64 | So use GIT_DIR from the settings if available |
| 65 | |
| 66 | Note: I (OC) think that this should be the default behaviour, |
| 67 | but I don't want to break other platforms, so I introduced |
| 68 | the MacOS X special case. Feel free to make this the default if |
| 69 | you do feel the same. |
| 70 | */ |
| 71 | if (args.first() == "git" || args.first().startsWith("git-")) { |
| 72 | |
| 73 | if (!QGit::GIT_DIR.isEmpty()) // application built from sources |
| 74 | args.first().prepend(QGit::GIT_DIR + '/'); |
| 75 | |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | |
| 80 | |
54 | 81 | #else |
55 | 82 | |
56 | 83 | #include <sys/types.h> // used by chmod() |