Change name and prepare for push

This commit is contained in:
2026-07-28 18:03:43 +02:00
parent 42dcceaf4b
commit a0098a3946
9 changed files with 95 additions and 40 deletions

View File

@@ -57,7 +57,7 @@ func analyzeConflictFiles(
if repositoryURL == "" || baseRef == "" || number <= 0 {
return nil, errors.New("missing repository merge metadata")
}
gitDir, err := os.MkdirTemp("", "gh-threads-conflicts-*")
gitDir, err := os.MkdirTemp("", "diple-conflicts-*")
if err != nil {
return nil, fmt.Errorf("create temporary merge repository: %w", err)
}
@@ -83,8 +83,8 @@ func analyzeConflictFiles(
}
refspecs := []string{
"+refs/heads/" + baseRef + ":refs/gh-threads/base",
"+refs/pull/" + strconv.Itoa(number) + "/head:refs/gh-threads/head",
"+refs/heads/" + baseRef + ":refs/diple/base",
"+refs/pull/" + strconv.Itoa(number) + "/head:refs/diple/head",
}
fetch := func(depthArgs ...string) error {
args := []string{"-C", gitDir, "fetch", "--quiet", "--no-tags", "--filter=blob:none"}
@@ -113,7 +113,7 @@ func analyzeConflictFiles(
output, runErr := run(
"-C", gitDir, "merge-tree", "--write-tree", "--name-only", "--no-messages", "-z",
"refs/gh-threads/base", "refs/gh-threads/head",
"refs/diple/base", "refs/diple/head",
)
if runErr == nil {
return nil, nil
@@ -130,7 +130,7 @@ func mergeBaseExists(
gitDir string,
) bool {
_, err := run(
"-C", gitDir, "merge-base", "refs/gh-threads/base", "refs/gh-threads/head",
"-C", gitDir, "merge-base", "refs/diple/base", "refs/diple/head",
)
return err == nil
}