#16 -- Clear previous commits
This commit is contained in:
parent
50bc8aee9e
commit
fb068f7b2a
@ -48,6 +48,8 @@ public class IndexService {
|
|||||||
branchRepository.save(new Branch(repository, branchName));
|
branchRepository.save(new Branch(repository, branchName));
|
||||||
}
|
}
|
||||||
List<Commit> commits = gitRepositoryService.getCommits(repositoryUrl, branchName);
|
List<Commit> commits = gitRepositoryService.getCommits(repositoryUrl, branchName);
|
||||||
|
commitRepository.deleteAll(branch.getCommits());
|
||||||
|
branch.getCommits().clear();
|
||||||
branch.setCommits(commits);
|
branch.setCommits(commits);
|
||||||
branchRepository.save(branch);
|
branchRepository.save(branch);
|
||||||
gitRepositoryService.remove(repositoryUrl);
|
gitRepositoryService.remove(repositoryUrl);
|
||||||
|
Loading…
Reference in New Issue
Block a user