Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion internal/upstream/history.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@ func historyOriginal(request ExportRequest) (map[string]file, error) {
}
if wants.Len() > 0 {
env := removeEnv(gitx.Environment("GIT_TERMINAL_PROMPT=0"), "OPENCODE_API_KEY")
if _, err := gitx.SafeStdinEnv(directory, env, []byte(wants.String()), "fetch", "--quiet", "--no-tags", "--no-write-fetch-head", "--filter=blob:none", "--stdin", "origin"); err != nil {
// Skip negotiation, as Git's own promisor fetch does, so local commits are not
// advertised as haves; GitHub otherwise omits requested blobs reachable from them.
if _, err := gitx.SafeStdinEnv(directory, env, []byte(wants.String()), "-c", "fetch.negotiationAlgorithm=noop",
"fetch", "--quiet", "--no-tags", "--no-write-fetch-head", "--filter=blob:none", "--stdin", "origin"); err != nil {
return nil, fmt.Errorf("cannot fetch registered original blobs from upstream history")
}
}
Expand Down
Loading