mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-01-01 05:09:50 +01:00
Commit and push changes
This commit is contained in:
@@ -64,7 +64,9 @@ public class GitModifyCommand extends AbstractGitCommand implements ModifyComman
|
||||
for (ModifyCommandRequest.PartialRequest r: request.getRequests()) {
|
||||
r.execute(this);
|
||||
}
|
||||
return null;
|
||||
doCommit();
|
||||
push();
|
||||
return clone.getRepository().getRefDatabase().findRef("HEAD").getObjectId().name();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -165,6 +167,16 @@ public class GitModifyCommand extends AbstractGitCommand implements ModifyComman
|
||||
return request.getAuthor();
|
||||
}
|
||||
}
|
||||
|
||||
private void push() {
|
||||
try {
|
||||
clone.push().call();
|
||||
} catch (GitAPIException e) {
|
||||
throw new IntegrateChangesFromWorkdirException(repository,
|
||||
"could not push modified branch " + request.getBranch() + " into central repository", e);
|
||||
}
|
||||
LOG.debug("pushed modified branch {}", request.getBranch());
|
||||
}
|
||||
}
|
||||
|
||||
private String throwInternalRepositoryException(String message, Exception e) {
|
||||
|
||||
Reference in New Issue
Block a user