Skip to content

Commit d5ed766

Browse files
skarimCopilot
andcommitted
Give the rebase integration tests a repo-local git identity
The new integration tests drive the production rebase helpers, which shell out to git without the identity environment variables gitExec sets, so creating a commit during a rebase failed on a runner with no global git identity — passing locally and on macOS but failing on ubuntu-latest. Recording the identity in the clone's own config covers every git process started in it, whatever path reaches git. Verified by running the whole suite with GIT_CONFIG_GLOBAL and GIT_CONFIG_SYSTEM pointed at /dev/null. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: f5959297-80fd-4732-aeae-aa9a4b6a7755
1 parent fcacfc9 commit d5ed766

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

internal/git/rebase_start_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ func stackedRepo(t *testing.T) string {
1414
t.Helper()
1515
_, clone := setupBareAndClone(t)
1616

17+
// These tests drive the production rebase helpers, which shell out to git
18+
// without the identity env vars gitExec sets. Record it in the repo config
19+
// so any git process started in this clone can create commits, including on
20+
// machines with no global identity configured.
21+
gitExec(t, clone, "config", "user.name", "Test")
22+
gitExec(t, clone, "config", "user.email", "test@test.com")
23+
1724
writeFile(t, clone, "trunk.txt", "trunk v1")
1825
gitExec(t, clone, "add", ".")
1926
gitExec(t, clone, "commit", "-m", "trunk commit")

0 commit comments

Comments
 (0)