make sure that git repo info is only added if the musrfit project source is indeed a git repo, and not e.g. a download.

This commit is contained in:
2021-07-12 15:34:07 +02:00
parent edeff3563c
commit d3d55f8719
31 changed files with 279 additions and 70 deletions

View File

@@ -32,7 +32,9 @@ using namespace std;
#include <QApplication>
#ifdef HAVE_GIT_REV_H
#include "../include/git-revision.h"
#endif
#include "PTextEdit.h"
#include "PFitOutputHandler.h"
@@ -53,7 +55,11 @@ int main( int argc, char ** argv )
cout << endl << endl;
return 0;
} else if (!strcmp(argv[1], "--version") || !strcmp(argv[1], "-v")) {
#ifdef HAVE_GIT_REV_H
cout << endl << "musredit git-branch: " << GIT_BRANCH << ", git-rev: " << GIT_CURRENT_SHA1;
#else
cout << endl << "musredit version: unknown. ";
#endif
cout << endl << endl;
return 0;
}