1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-19 20:10:55 +01:00

Reset Drydock git working copies better

Summary: Ref T9252. We're currently resetting to the local branch, but should be resetting to the origin branch.

Test Plan: Restarted a build, had it run `git show`, saw proper HEAD.

Reviewers: chad

Reviewed By: chad

Subscribers: hach-que

Maniphest Tasks: T9252

Differential Revision: https://secure.phabricator.com/D14194
This commit is contained in:
epriestley 2015-09-30 07:45:02 -07:00
parent 8f2f841d17
commit 9d997df964

View file

@ -213,7 +213,10 @@ final class DrydockWorkingCopyBlueprintImplementation
$cmd[] = 'git reset --hard %s';
$arg[] = $commit;
} else if ($branch !== null) {
$cmd[] = 'git reset --hard %s';
$cmd[] = 'git checkout %s';
$arg[] = $branch;
$cmd[] = 'git reset --hard origin/%s';
$arg[] = $branch;
} else {
$cmd[] = 'git reset --hard HEAD';