Skip to content
This repository was archived by the owner on Apr 7, 2022. It is now read-only.

Commit 9d997df

Browse files
author
epriestley
committed
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
1 parent 8f2f841 commit 9d997df

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/applications/drydock/blueprint/DrydockWorkingCopyBlueprintImplementation.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,10 @@ public function activateLease(
213213
$cmd[] = 'git reset --hard %s';
214214
$arg[] = $commit;
215215
} else if ($branch !== null) {
216-
$cmd[] = 'git reset --hard %s';
216+
$cmd[] = 'git checkout %s';
217+
$arg[] = $branch;
218+
219+
$cmd[] = 'git reset --hard origin/%s';
217220
$arg[] = $branch;
218221
} else {
219222
$cmd[] = 'git reset --hard HEAD';

0 commit comments

Comments
 (0)