Skip to content
Snippets Groups Projects
Commit cd3b47ce authored by Alain Goasduff's avatar Alain Goasduff
Browse files

now compatible with old git version, at least 1.8.3.1

parent e93fb825
No related branches found
No related tags found
No related merge requests found
......@@ -98,9 +98,9 @@ void processGit(string filename)
string newfile = nf;
newfile = oldname + newfile + "__" + GetMachineID() + ".json";
//we must pull the submodule first to ensure all is up to date
if (system("git -C ./caenslowcontrol_json pull > gitlog.txt") != 0)
if (system("git --git-dir=./caenslowcontrol_json/.git pull > gitlog.txt") != 0)
{
ShowError("git -C ./caenslowcontrol_json pull > gitlog.txt");
ShowError("git --git-dir=./caenslowcontrol_json/.git pull > gitlog.txt");
return;
}
sleep(1);
......@@ -121,7 +121,7 @@ void processGit(string filename)
//git add
path = PROJECT_NAME;
cmd = "git -C ./caenslowcontrol_json add " + path + "/" + newfile + " >> gitlog.txt";
cmd = "git --git-dir=./caenslowcontrol_json/.git add " + path + "/" + newfile + " >> gitlog.txt";
if (system(cmd.c_str()) != 0)
{
ShowError(cmd);
......@@ -131,7 +131,7 @@ void processGit(string filename)
//git commit
string commit = "\"autopush of " + newfile + "\"";
cmd = "git -C ./caenslowcontrol_json commit -m " + commit + " >> gitlog.txt";
cmd = "git --git-dir=./caenslowcontrol_json/.git commit -m " + commit + " >> gitlog.txt";
if (system(cmd.c_str()) != 0)
{
ShowError(cmd);
......@@ -139,7 +139,7 @@ void processGit(string filename)
}
//git push
cmd = "git -C ./caenslowcontrol_json push >> gitlog.txt";
cmd = "git --git-dir=./caenslowcontrol_json/.git push >> gitlog.txt";
if (system(cmd.c_str()) != 0)
{
ShowError(cmd);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment