Skip to content

Commit 874ecf8

Browse files
committed
update from larc1
1 parent cb39bbd commit 874ecf8

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/utils/GitUtil.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,6 @@ public static Boolean checkoutCommit(Path repoDir, String com, Boolean ifForce)
215215
pr = ProcessUtil.executeCMD(resetCMD, null, repoDir, 0);
216216
}
217217

218-
String defaultBranchNameString = getDefaultBranch(repoDir);
219-
220218
String checkoutCMD = null;
221219
checkoutCMD = "timeout 300 git checkout " + com;
222220
pr = ProcessUtil.executeCMD(checkoutCMD, null, repoDir, 0);
@@ -252,7 +250,7 @@ public static Boolean checkoutCommit(Path repoDir, String com, Boolean ifForce)
252250

253251
private static String getDefaultBranch(Path gitDirPath) {
254252
// TODO Auto-generated method stub
255-
String cmdString = "git symbolic-ref refs/remotes/origin/HEAD";
253+
String cmdString = "timeout 60 git symbolic-ref refs/remotes/origin/HEAD";
256254
ProcessUtil.ProcessReporter pr = ProcessUtil.executeCMD(cmdString, null, gitDirPath, 0);
257255

258256
// output refs/remotes/origin/master

0 commit comments

Comments
 (0)