Skip to content

Commit

Permalink
Add config option for git-sync --pull
Browse files Browse the repository at this point in the history
  • Loading branch information
edvbld committed Nov 20, 2019
1 parent 2881d91 commit ae8a592
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cli/src/main/java/org/openjdk/skara/cli/GitSync.java
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,12 @@ public static void main(String[] args) throws IOException, InterruptedException
System.out.println("done");
}

if (arguments.contains("pull")) {
var shouldPull = arguments.contains("pull");
if (!shouldPull) {
var lines = repo.config("sync.pull");
shouldPull = lines.size() == 1 && lines.get(0).toLowerCase().equals("always");
}
if (shouldPull) {
int err = pull();
if (err != 0) {
System.exit(err);
Expand Down

0 comments on commit ae8a592

Please sign in to comment.