Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hiifong committed Jan 14, 2025
1 parent 6ed8c28 commit b42703f
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 24 deletions.
12 changes: 0 additions & 12 deletions services/gitdiff/gitdiff_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -667,15 +667,3 @@ func TestNoCrashes(t *testing.T) {
ParsePatch(db.DefaultContext, setting.Git.MaxGitDiffLines, setting.Git.MaxGitDiffLineCharacters, setting.Git.MaxGitDiffFiles, strings.NewReader(testcase.gitdiff), "")
}
}

func TestParentCommitNotExits(t *testing.T) {
gitRepo, err := git.OpenRepository(git.DefaultContext, "./testdata/parent-commit-not-exits")
require.NoError(t, err)
defer gitRepo.Close()

diff, err := GetDiff(git.DefaultContext, gitRepo, &DiffOptions{
AfterCommitID: "d01637fe74c3727d9d1e5f691f343988d3e5342f",
})
assert.ErrorContains(t, err, "object does not exist [id: af35b81c4c8bd963b77b51b207ae4dc90e1904af, rel_path: ]")
assert.Nil(t, diff)
}
1 change: 0 additions & 1 deletion services/gitdiff/testdata/parent-commit-not-exits/HEAD

This file was deleted.

8 changes: 0 additions & 8 deletions services/gitdiff/testdata/parent-commit-not-exits/config

This file was deleted.

Binary file not shown.
Binary file not shown.
2 changes: 0 additions & 2 deletions services/gitdiff/testdata/parent-commit-not-exits/packed-refs

This file was deleted.

1 change: 0 additions & 1 deletion services/gitdiff/testdata/parent-commit-not-exits/shallow

This file was deleted.

0 comments on commit b42703f

Please sign in to comment.