diff --git src/qgit.cpp src/qgit.cpp index 8960cb8..7731802 100644 --- src/qgit.cpp +++ src/qgit.cpp @@ -54,7 +54,9 @@ int main(int argc, char* argv[]) { parser.parse(app.arguments()); if (parser.isSet("help") +#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) || parser.isSet("help-all") +#endif || parser.isSet("version")) { QCoreApplication::setApplicationName("QGit"); parser.process(app.arguments()); // exits the process @@ -99,11 +101,11 @@ int main(int argc, char* argv[]) { } #endif - /* On Windows msysgit exec directory is set up - * during installation so to always find git.exe - * also if not in PATH - */ QSettings set; + if ( set.value(GIT_DIR_KEY).toString().isEmpty() ) { + // path to git is not set. Set it to our default. + set.setValue(GIT_DIR_KEY, "/opt/local/bin"); + } GIT_DIR = set.value(GIT_DIR_KEY).toString(); initMimePix();