Skip to content

Commit efd10f1

Browse files
authored
git backend ignore replace objects (go-gitea#18979)
* git backend ignore replace objects * comment
1 parent 04971c3 commit efd10f1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

modules/git/command.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,8 @@ func (c *Command) RunWithContext(rc *RunContext) error {
158158
fmt.Sprintf("LC_ALL=%s", DefaultLocale),
159159
// avoid prompting for credentials interactively, supported since git v2.3
160160
"GIT_TERMINAL_PROMPT=0",
161+
// ignore replace references (https://git-scm.com/docs/git-replace)
162+
"GIT_NO_REPLACE_OBJECTS=1",
161163
)
162164

163165
cmd.Dir = rc.Dir

0 commit comments

Comments
 (0)