mirror of
https://github.com/go-gitea/gitea.git
synced 2026-05-22 21:45:24 +02:00
11 lines
401 B
Go
11 lines
401 B
Go
// Copyright 2026 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package gitrepo
|
|
|
|
// getRepoWriteLockKey returns the global lock key for write operations on the repository.
|
|
// Parallel write operations on the same git repository should be avoided to prevent data corruption.
|
|
func getRepoWriteLockKey(repoStoragePath string) string {
|
|
return "repo-write:" + repoStoragePath
|
|
}
|