diff --git a/modules/git/command.go b/modules/git/command.go index 3cf85c2d85..f2cae52b6f 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