Skip to content

Commit

Permalink
fix: avoid resetting fetch head when doing branch fetch unshallow (#4577
Browse files Browse the repository at this point in the history
)
  • Loading branch information
0x0013 authored Nov 7, 2024
1 parent 842def0 commit d4247bc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions server/events/working_dir.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,12 @@ func (w *FileWorkspace) mergeToBaseBranch(logger logging.SimpleLogging, c wrappe
if err := w.wrappedGit(logger, c, "fetch", "--unshallow"); err != nil {
return err
}

// fetch once more, otherwise `FETCH_HEAD` was reset to base when we ran
// fetch --unshallow
if err := w.wrappedGit(logger, c, "fetch", fetchRemote, fetchRef); err != nil {
return err
}
}

// We use --no-ff because we always want there to be a merge commit.
Expand Down

0 comments on commit d4247bc

Please sign in to comment.