|
|
@ -313,7 +313,6 @@ public class MergeGitAttributeTest extends RepositoryTestCase { |
|
|
|
WrongRepositoryStateException, NoMessageException, GitAPIException { |
|
|
|
WrongRepositoryStateException, NoMessageException, GitAPIException { |
|
|
|
|
|
|
|
|
|
|
|
RevCommit disableCheckedCommit; |
|
|
|
RevCommit disableCheckedCommit; |
|
|
|
FileInputStream mergeResultFile = null; |
|
|
|
|
|
|
|
// Set up a git with conflict commits on images
|
|
|
|
// Set up a git with conflict commits on images
|
|
|
|
try (Git git = new Git(db)) { |
|
|
|
try (Git git = new Git(db)) { |
|
|
|
// First commit
|
|
|
|
// First commit
|
|
|
@ -352,15 +351,12 @@ public class MergeGitAttributeTest extends RepositoryTestCase { |
|
|
|
assertEquals(MergeStatus.CONFLICTING, mergeResult.getMergeStatus()); |
|
|
|
assertEquals(MergeStatus.CONFLICTING, mergeResult.getMergeStatus()); |
|
|
|
|
|
|
|
|
|
|
|
// Check that the image was not modified (no conflict marker added)
|
|
|
|
// Check that the image was not modified (no conflict marker added)
|
|
|
|
mergeResultFile = new FileInputStream( |
|
|
|
try (FileInputStream mergeResultFile = new FileInputStream( |
|
|
|
db.getWorkTree().toPath().resolve(ENABLED_CHECKED_GIF) |
|
|
|
db.getWorkTree().toPath().resolve(ENABLED_CHECKED_GIF) |
|
|
|
.toFile()); |
|
|
|
.toFile())) { |
|
|
|
assertTrue(contentEquals( |
|
|
|
assertTrue(contentEquals( |
|
|
|
getClass().getResourceAsStream(ENABLED_CHECKED_GIF), |
|
|
|
getClass().getResourceAsStream(ENABLED_CHECKED_GIF), |
|
|
|
mergeResultFile)); |
|
|
|
mergeResultFile)); |
|
|
|
} finally { |
|
|
|
|
|
|
|
if (mergeResultFile != null) { |
|
|
|
|
|
|
|
mergeResultFile.close(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -373,7 +369,6 @@ public class MergeGitAttributeTest extends RepositoryTestCase { |
|
|
|
WrongRepositoryStateException, NoMessageException, GitAPIException { |
|
|
|
WrongRepositoryStateException, NoMessageException, GitAPIException { |
|
|
|
|
|
|
|
|
|
|
|
RevCommit disableCheckedCommit; |
|
|
|
RevCommit disableCheckedCommit; |
|
|
|
FileInputStream mergeResultFile = null; |
|
|
|
|
|
|
|
// Set up a git whith conflict commits on images
|
|
|
|
// Set up a git whith conflict commits on images
|
|
|
|
try (Git git = new Git(db)) { |
|
|
|
try (Git git = new Git(db)) { |
|
|
|
// First commit
|
|
|
|
// First commit
|
|
|
@ -412,14 +407,12 @@ public class MergeGitAttributeTest extends RepositoryTestCase { |
|
|
|
assertEquals(MergeStatus.CONFLICTING, mergeResult.getMergeStatus()); |
|
|
|
assertEquals(MergeStatus.CONFLICTING, mergeResult.getMergeStatus()); |
|
|
|
|
|
|
|
|
|
|
|
// Check that the image was not modified (not conflict marker added)
|
|
|
|
// Check that the image was not modified (not conflict marker added)
|
|
|
|
mergeResultFile = new FileInputStream(db.getWorkTree().toPath() |
|
|
|
try (FileInputStream mergeResultFile = new FileInputStream( |
|
|
|
.resolve(ENABLED_CHECKED_GIF).toFile()); |
|
|
|
db.getWorkTree().toPath().resolve(ENABLED_CHECKED_GIF) |
|
|
|
|
|
|
|
.toFile())) { |
|
|
|
assertTrue(contentEquals( |
|
|
|
assertTrue(contentEquals( |
|
|
|
getClass().getResourceAsStream(ENABLED_CHECKED_GIF), |
|
|
|
getClass().getResourceAsStream(ENABLED_CHECKED_GIF), |
|
|
|
mergeResultFile)); |
|
|
|
mergeResultFile)); |
|
|
|
} finally { |
|
|
|
|
|
|
|
if (mergeResultFile != null) { |
|
|
|
|
|
|
|
mergeResultFile.close(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -432,7 +425,6 @@ public class MergeGitAttributeTest extends RepositoryTestCase { |
|
|
|
NoMessageException, GitAPIException { |
|
|
|
NoMessageException, GitAPIException { |
|
|
|
|
|
|
|
|
|
|
|
RevCommit disableCheckedCommit; |
|
|
|
RevCommit disableCheckedCommit; |
|
|
|
FileInputStream mergeResultFile = null; |
|
|
|
|
|
|
|
// Set up a git whith conflict commits on images
|
|
|
|
// Set up a git whith conflict commits on images
|
|
|
|
try (Git git = new Git(db)) { |
|
|
|
try (Git git = new Git(db)) { |
|
|
|
// First commit
|
|
|
|
// First commit
|
|
|
@ -471,14 +463,12 @@ public class MergeGitAttributeTest extends RepositoryTestCase { |
|
|
|
assertEquals(MergeStatus.CONFLICTING, mergeResult.getMergeStatus()); |
|
|
|
assertEquals(MergeStatus.CONFLICTING, mergeResult.getMergeStatus()); |
|
|
|
|
|
|
|
|
|
|
|
// Check that the image was not modified (not conflict marker added)
|
|
|
|
// Check that the image was not modified (not conflict marker added)
|
|
|
|
mergeResultFile = new FileInputStream(db.getWorkTree().toPath() |
|
|
|
try (FileInputStream mergeResultFile = new FileInputStream( |
|
|
|
.resolve(ENABLED_CHECKED_GIF).toFile()); |
|
|
|
db.getWorkTree().toPath().resolve(ENABLED_CHECKED_GIF) |
|
|
|
|
|
|
|
.toFile())) { |
|
|
|
assertFalse(contentEquals( |
|
|
|
assertFalse(contentEquals( |
|
|
|
getClass().getResourceAsStream(ENABLED_CHECKED_GIF), |
|
|
|
getClass().getResourceAsStream(ENABLED_CHECKED_GIF), |
|
|
|
mergeResultFile)); |
|
|
|
mergeResultFile)); |
|
|
|
} finally { |
|
|
|
|
|
|
|
if (mergeResultFile != null) { |
|
|
|
|
|
|
|
mergeResultFile.close(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|