mirror of
https://github.com/go-gitea/gitea.git
synced 2025-10-27 00:23:41 +09:00
Fix merge panic (#35606)
To prevent potential bugs, the logic in #35543 makes `gitcmd.Command` panic when attempting to override stdout or stderr. Instead of using `PrepareCmd`, this PR now uses the WithXXX methods directly to avoid the panic. Fix #35603
This commit is contained in:
@@ -27,7 +27,10 @@ func TestRepoActivity(t *testing.T) {
|
||||
resp := testPullCreate(t, session, "user1", "repo1", false, "master", "master", "This is a pull title")
|
||||
elem := strings.Split(test.RedirectURL(resp), "/")
|
||||
assert.Equal(t, "pulls", elem[3])
|
||||
testPullMerge(t, session, elem[1], elem[2], elem[4], repo_model.MergeStyleMerge, false)
|
||||
testPullMerge(t, session, elem[1], elem[2], elem[4], MergeOptions{
|
||||
Style: repo_model.MergeStyleMerge,
|
||||
DeleteBranch: false,
|
||||
})
|
||||
|
||||
testEditFileToNewBranch(t, session, "user1", "repo1", "master", "feat/better_readme", "README.md", "Hello, World (Edited Again)\n")
|
||||
testPullCreate(t, session, "user1", "repo1", false, "master", "feat/better_readme", "This is a pull title")
|
||||
|
||||
Reference in New Issue
Block a user