Skip to content

Commit 6273570

Browse files
committed
continue
1 parent c4c70c3 commit 6273570

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

src/main/java/org/scm4j/vcs/GitVCS.java

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -184,10 +184,11 @@ public void deleteBranch(String branchName, String commitMessage) {
184184

185185
private void push(Git git, RefSpec refSpec) throws GitAPIException {
186186
PushCommand cmd = git
187-
.push()
188-
.setPushAll();
187+
.push();
189188
if (refSpec != null) {
190189
cmd.setRefSpecs(refSpec);
190+
} else {
191+
cmd.setPushAll();
191192
}
192193
cmd
193194
.setRemote("origin")
@@ -743,7 +744,6 @@ List<Ref> getTagRefs() throws Exception {
743744
Git git = getLocalGit(wc);
744745
Repository gitRepo = git.getRepository()) {
745746

746-
//checkout(git, gitRepo, MASTER_BRANCH_NAME, null);
747747
git.pull().call();
748748

749749
List<Ref> refs = git
@@ -827,7 +827,7 @@ public void checkout(String branchName, String targetPath, String revision) {
827827
Repository gitRepo = git.getRepository()) {
828828

829829
checkout(git, gitRepo, branchName, revision);
830-
830+
831831
} catch (GitAPIException e) {
832832
throw new EVCSException(e);
833833
} catch (Exception e) {
@@ -838,9 +838,10 @@ public void checkout(String branchName, String targetPath, String revision) {
838838
@Override
839839
public Boolean isRevisionTagged(String revision) {
840840
try (IVCSLockedWorkingCopy wc = repo.getVCSLockedWorkingCopy();
841-
Git git = getLocalGit(wc);
842-
Repository gitRepo = git.getRepository();
843-
RevWalk rw = new RevWalk(gitRepo)) {
841+
Git git = getLocalGit(wc);
842+
Repository gitRepo = git.getRepository();
843+
RevWalk rw = new RevWalk(gitRepo)) {
844+
844845
checkout(git, gitRepo, MASTER_BRANCH_NAME, null);
845846
List<Ref> tagRefs = getTagRefs();
846847
for (Ref ref : tagRefs) {
@@ -870,6 +871,8 @@ public VCSTag getTagByName(String tagName) {
870871
Repository gitRepo = git.getRepository();
871872
RevWalk rw = new RevWalk(gitRepo)) {
872873

874+
git.pull().call();
875+
873876
List<Ref> tagRefs = getTagRefs();
874877
RevCommit revCommit;
875878
for (Ref ref : tagRefs) {

0 commit comments

Comments
 (0)