Closed kumarp149 closed 1 month ago
6.10.0
Linux/Unix
Consider the following test case. Following are the steps that are done in the code:
@Test public void RevTreeParsingTest() throws Exception{ Git git = Git.wrap(db); String binaryFile = "file.bin"; writeTrashFile(binaryFile, "\u0000\u0001"); git.add().addFilepattern(binaryFile).call(); git.commit().setMessage("BASE COMMIT").call(); deleteTrashFile(binaryFile); git.add().addFilepattern(binaryFile).call(); RevCommit commit2 = git.commit().setMessage("COMMIT-1").call(); RevTree tree = commit2.getTree(); TreeWalk tw = new TreeWalk(git.getRepository()); tw.addTree(tree); boolean found = false; while(tw.next()){ if (tw.getPathString().equals(binaryFile)){ found = true; break; } } assert !found; }
The test case is failing
The test case should pass (i.e. the deleted path should not be present in the treewalk)
No response
Use git.rm().addFilepattern(binaryFile).call() instead of
git.rm().addFilepattern(binaryFile).call()
deleteTrashFile(binaryFile); git.add().addFilepattern(binaryFile).call();
Version
6.10.0
Operating System
Linux/Unix
Bug description
Consider the following test case. Following are the steps that are done in the code:
Actual behavior
The test case is failing
Expected behavior
The test case should pass (i.e. the deleted path should not be present in the treewalk)
Relevant log output
No response
Other information
No response