From efd10f1ab4bd66ef8e583ff8f9d3d25f7f741a6a Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Wed, 2 Mar 2022 21:13:19 +0100 Subject: [PATCH] git backend ignore replace objects (#18979) * git backend ignore replace objects * comment --- modules/git/command.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/git/command.go b/modules/git/command.go index ba982f31809..649d9cf249f 100644 --- a/modules/git/command.go +++ b/modules/git/command.go @@ -158,6 +158,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", ) cmd.Dir = rc.Dir