forked from lix-project/hydra
In case of deep clone, make sure there is local branch.
This commit is contained in:
parent
7da48b5220
commit
be3748e1ec
|
@ -343,6 +343,10 @@ sub fetchInputGit {
|
||||||
($res, $stdout, $stderr) = captureStdoutStderr(600,
|
($res, $stdout, $stderr) = captureStdoutStderr(600,
|
||||||
("git", "pull", "--ff-only", "-fu", "--all"));
|
("git", "pull", "--ff-only", "-fu", "--all"));
|
||||||
die "Error pulling latest change from git repo at `$uri':\n$stderr" unless $res;
|
die "Error pulling latest change from git repo at `$uri':\n$stderr" unless $res;
|
||||||
|
# Make sure there is a local branch
|
||||||
|
($res, $stdout, $stderr) = captureStdoutStderr(600,
|
||||||
|
("git", "checkout", "-f", $branch));
|
||||||
|
die "Error making local branch $branch in $clonePath from git repo at `$uri':\n$stderr" unless $res;
|
||||||
} else {
|
} else {
|
||||||
# This command force the update of the local branch to be in the same as
|
# This command force the update of the local branch to be in the same as
|
||||||
# the remote branch for whatever the repository state is. This command mirror
|
# the remote branch for whatever the repository state is. This command mirror
|
||||||
|
|
Loading…
Reference in a new issue