From dc4ba9a1fe5bdb171f4acbc8aa2a1e666f665f50 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Wed, 2 Mar 2022 20:27:13 +0100 Subject: [PATCH 1/2] git backend ignore replace objects --- modules/git/command.go | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/git/command.go b/modules/git/command.go index ba982f31809aa..c49d9af0a8bc1 100644 --- a/modules/git/command.go +++ b/modules/git/command.go @@ -158,6 +158,7 @@ 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", + "GIT_NO_REPLACE_OBJECTS=1", ) cmd.Dir = rc.Dir From 0dc2546d0723fb5bbd1ef206a1ddd52c3caca756 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Wed, 2 Mar 2022 20:29:43 +0100 Subject: [PATCH 2/2] comment --- modules/git/command.go | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/git/command.go b/modules/git/command.go index c49d9af0a8bc1..649d9cf249f39 100644 --- a/modules/git/command.go +++ b/modules/git/command.go @@ -158,6 +158,7 @@ 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", )