mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-03 21:08:25 +00:00 
			
		
		
		
	Fix tautological conditions (#30735)
As discovered by https://github.com/go-gitea/gitea/pull/30729. --------- Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
		@@ -81,7 +81,7 @@ func testGit(t *testing.T, u *url.URL) {
 | 
			
		||||
		rawTest(t, &httpContext, little, big, littleLFS, bigLFS)
 | 
			
		||||
		mediaTest(t, &httpContext, little, big, littleLFS, bigLFS)
 | 
			
		||||
 | 
			
		||||
		t.Run("CreateAgitFlowPull", doCreateAgitFlowPull(dstPath, &httpContext, "master", "test/head"))
 | 
			
		||||
		t.Run("CreateAgitFlowPull", doCreateAgitFlowPull(dstPath, &httpContext, "test/head"))
 | 
			
		||||
		t.Run("BranchProtectMerge", doBranchProtectPRMerge(&httpContext, dstPath))
 | 
			
		||||
		t.Run("AutoMerge", doAutoPRMerge(&httpContext, dstPath))
 | 
			
		||||
		t.Run("CreatePRAndSetManuallyMerged", doCreatePRAndSetManuallyMerged(httpContext, httpContext, dstPath, "master", "test-manually-merge"))
 | 
			
		||||
@@ -122,7 +122,7 @@ func testGit(t *testing.T, u *url.URL) {
 | 
			
		||||
			rawTest(t, &sshContext, little, big, littleLFS, bigLFS)
 | 
			
		||||
			mediaTest(t, &sshContext, little, big, littleLFS, bigLFS)
 | 
			
		||||
 | 
			
		||||
			t.Run("CreateAgitFlowPull", doCreateAgitFlowPull(dstPath, &sshContext, "master", "test/head2"))
 | 
			
		||||
			t.Run("CreateAgitFlowPull", doCreateAgitFlowPull(dstPath, &sshContext, "test/head2"))
 | 
			
		||||
			t.Run("BranchProtectMerge", doBranchProtectPRMerge(&sshContext, dstPath))
 | 
			
		||||
			t.Run("MergeFork", func(t *testing.T) {
 | 
			
		||||
				defer tests.PrintCurrentTest(t)()
 | 
			
		||||
@@ -329,9 +329,6 @@ func generateCommitWithNewData(size int, repoPath, email, fullName, prefix strin
 | 
			
		||||
		}
 | 
			
		||||
		written += n
 | 
			
		||||
	}
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return "", err
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// Commit
 | 
			
		||||
	// Now here we should explicitly allow lfs filters to run
 | 
			
		||||
@@ -693,7 +690,7 @@ func doAutoPRMerge(baseCtx *APITestContext, dstPath string) func(t *testing.T) {
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func doCreateAgitFlowPull(dstPath string, ctx *APITestContext, baseBranch, headBranch string) func(t *testing.T) {
 | 
			
		||||
func doCreateAgitFlowPull(dstPath string, ctx *APITestContext, headBranch string) func(t *testing.T) {
 | 
			
		||||
	return func(t *testing.T) {
 | 
			
		||||
		defer tests.PrintCurrentTest(t)()
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user