set correct working directory for git commands except 'clone'
This commit is contained in:
@@ -64,11 +64,13 @@ bool GitCommand::exec(QStringList const &options, int start_timeout, int finish_
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool GitCommand::check(int start_timeout, int finish_timeout) {
|
bool GitCommand::check(int start_timeout, int finish_timeout) {
|
||||||
|
m_workingDirectory = customerRepoDir();
|
||||||
QStringList const lst{"fsck"};
|
QStringList const lst{"fsck"};
|
||||||
return exec(lst, start_timeout, finish_timeout);
|
return exec(lst, start_timeout, finish_timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GitCommand::checkout(int start_timeout, int finish_timeout) {
|
bool GitCommand::checkout(int start_timeout, int finish_timeout) {
|
||||||
|
m_workingDirectory = customerRepoDir();
|
||||||
int const zoneNr = read1stLineOfFile("/mnt/system_data/zone_nr");
|
int const zoneNr = read1stLineOfFile("/mnt/system_data/zone_nr");
|
||||||
if (zoneNr != -1) {
|
if (zoneNr != -1) {
|
||||||
QStringList const lst{"checkout", QString("zg1/zone%1").arg(zoneNr)};
|
QStringList const lst{"checkout", QString("zg1/zone%1").arg(zoneNr)};
|
||||||
@@ -91,11 +93,13 @@ bool GitCommand::clone(int start_timeout, int finish_timeout) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool GitCommand::pull(int start_timeout, int finish_timeout) {
|
bool GitCommand::pull(int start_timeout, int finish_timeout) {
|
||||||
|
m_workingDirectory = customerRepoDir();
|
||||||
QStringList const lst{"pull"};
|
QStringList const lst{"pull"};
|
||||||
return exec(lst, start_timeout, finish_timeout);
|
return exec(lst, start_timeout, finish_timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GitCommand::status(int start_timeout, int finish_timeout) {
|
bool GitCommand::status(int start_timeout, int finish_timeout) {
|
||||||
|
m_workingDirectory = customerRepoDir();
|
||||||
QStringList const lst{"status"};
|
QStringList const lst{"status"};
|
||||||
return exec(lst, start_timeout, finish_timeout);
|
return exec(lst, start_timeout, finish_timeout);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user