-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git: Don't reset last active branch to wrong commit
When we change the checked out code using `git reset --hard <rev>` we also change the revision that the currently active branch points to. This leads to that branch pointing to a wrong commit as we're actually checking out a different branch (we switch to it just a little bit later). Instead of modifying the current branch we should just modify the working copy, which can be done by `git checkout -f <rev>`.
- Loading branch information
Showing
6 changed files
with
63 additions
and
63 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
master/buildbot/newsfragments/git-step-correct-branch-commits.bugfix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Fixed the ``Git`` source step causing last active branch to point to wrong commits. | ||
This only affected the branch state in the repository, the checked out code was correct. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.