return changesetId for git & hg

This commit is contained in:
Eduard Heimbuch
2019-10-24 11:57:16 +02:00
parent fb0eb329e5
commit 5c7bd90f7a
2 changed files with 2 additions and 5 deletions

View File

@@ -64,10 +64,7 @@ public class GitModifyCommand extends AbstractGitCommand implements ModifyComman
failIfNotChanged(() -> new NoChangesMadeException(repository, ModifyWorker.this.request.getBranch()));
Optional<RevCommit> revCommit = doCommit(request.getCommitMessage(), request.getAuthor());
push();
if (!revCommit.isPresent()) {
throw new NoChangesMadeException(repository, ModifyWorker.this.request.getBranch());
}
return ModifyWorker.this.request.getBranch();
return revCommit.orElseThrow(() -> new NoChangesMadeException(repository, ModifyWorker.this.request.getBranch())).name();
}
@Override