Commit 8208090f authored by Maxime Lefrançois's avatar Maxime Lefrançois
Browse files

checkout current branch after job done

parent deaf0f1c
Loading
Loading
Loading
Loading
+1 −1
Changes for src/main/java/fr/emse/gitlab/saref/Main.java: 1 added line, 1 removed line.
Original line number Original line Diff line number Diff line
@@ -309,7 +309,7 @@ public class Main {
		try(Git git = Git.open(repository.getDirectory())) {
		try(Git git = Git.open(repository.getDirectory())) {
			String currentBranch = repository.getCurrentBranch();
			String currentBranch = repository.getCurrentBranch();
			if(currentBranch != null) {
			if(currentBranch != null) {
				git.checkout().setStartPoint(currentBranch).call();
				git.checkout().setName(currentBranch).call();
			}
			}
		} catch (IOException | GitAPIException ex) {
		} catch (IOException | GitAPIException ex) {
			LOG.warn("Error while reseting repository " + repository, ex);
			LOG.warn("Error while reseting repository " + repository, ex);