aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author65432022-03-02 22:31:50 +0100
committerGitHub2022-03-02 21:31:50 +0000
commit87f8d37be5cf98b6bcdbe68a2ff749a14fb50278 (patch)
treef11604dd0e1bc8017516caa9043748eebd9455d8
parentf4b96c1041c590a34922ea697647562591f5c7a8 (diff)
git backend ignore replace objects (#18979) (#18980)
Co-authored-by: zeripath <art27@cantab.net>
-rw-r--r--modules/git/command.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/git/command.go b/modules/git/command.go
index 3cf85c2d8..f2cae52b6 100644
--- a/modules/git/command.go
+++ b/modules/git/command.go
@@ -163,6 +163,8 @@ func (c *Command) RunWithContext(rc *RunContext) error {
fmt.Sprintf("LC_ALL=%s", DefaultLocale),
// avoid prompting for credentials interactively, supported since git v2.3
"GIT_TERMINAL_PROMPT=0",
+ // ignore replace references (https://git-scm.com/docs/git-replace)
+ "GIT_NO_REPLACE_OBJECTS=1",
)
// TODO: verify if this is still needed in golang 1.15