Skip to content
Permalink
Browse files
Add config option for git-sync --pull
Reviewed-by: rwestberg
  • Loading branch information
edvbld committed Nov 21, 2019
1 parent 2881d91 commit 1a8ea8456976856129b1a31a92debab71985f1e6
Showing 1 changed file with 6 additions and 1 deletion.
@@ -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);

0 comments on commit 1a8ea84

Please sign in to comment.