diff options
author | Sami Hiltunen <shiltunen@gitlab.com> | 2023-05-25 10:26:17 +0300 |
---|---|---|
committer | Sami Hiltunen <shiltunen@gitlab.com> | 2023-05-25 11:13:13 +0300 |
commit | eb41a4a0cc71b40a7e93a03b80c3518ced9e60b2 (patch) | |
tree | a098589d67685e6e642e0acada7c9256e731b6c3 /internal/gitaly/transaction_manager.go | |
parent | ae3843b19e81e3387bda4b8f4040a9a044061add (diff) |
Rename updateDefaultBranch to applyDefaultBranchUpdate
This commit renames updateDefaultBranch to applyDefaultBranchUpdate
for more consistent naming with the other log application methods.
Diffstat (limited to 'internal/gitaly/transaction_manager.go')
-rw-r--r-- | internal/gitaly/transaction_manager.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/gitaly/transaction_manager.go b/internal/gitaly/transaction_manager.go index 91d07e504..c8a2362cf 100644 --- a/internal/gitaly/transaction_manager.go +++ b/internal/gitaly/transaction_manager.go @@ -1135,8 +1135,8 @@ func (mgr *TransactionManager) verifyDefaultBranchUpdate(ctx context.Context, tr return nil } -// updateDefaultBranch sets the default branch using localrepo.SetDefaultBranch if there is adequate datprovided. -func (mgr *TransactionManager) updateDefaultBranch(ctx context.Context, defaultBranch *gitalypb.LogEntry_DefaultBranchUpdate) error { +// applyDefaultBranchUpdate applies the default branch update to the repository from the log entry. +func (mgr *TransactionManager) applyDefaultBranchUpdate(ctx context.Context, defaultBranch *gitalypb.LogEntry_DefaultBranchUpdate) error { if defaultBranch == nil { return nil } @@ -1222,7 +1222,7 @@ func (mgr *TransactionManager) applyLogEntry(ctx context.Context, logIndex LogIn return fmt.Errorf("commit transaction: %w", err) } - if err := mgr.updateDefaultBranch(ctx, logEntry.DefaultBranchUpdate); err != nil { + if err := mgr.applyDefaultBranchUpdate(ctx, logEntry.DefaultBranchUpdate); err != nil { return fmt.Errorf("writing default branch: %w", err) } |