Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

allow user to choose active / inactive projects for the fetch command

  • Loading branch information...
commit e2e8e275c24c2c869dc43a847f32968641172b4b 1 parent 76de4c5
CSH authored
Showing with 11 additions and 2 deletions.
  1. +11 −2 src/main/java/uk/co/ignesco/teb/main/TebCommandLineProcessor.java
View
13 src/main/java/uk/co/ignesco/teb/main/TebCommandLineProcessor.java
@@ -43,7 +43,15 @@ public void process(File currentWorkingDirectory, String[] args) {
}
} else if(args[0].equals("fetch")) {
foundCommand = true;
- teb.fetch(ProjectStatus.inactive);
+
+ ProjectStatus projectType = ProjectStatus.inactive;
+ if(args.length>=2) {
+ if("active".equals(args[1])) {
+ projectType = ProjectStatus.active;
+ }
+ }
+
+ teb.fetch(projectType);
} else if(args[0].equals("sync")) {
foundCommand = true;
teb.sync(ProjectStatus.inactive);
@@ -74,7 +82,8 @@ private void outputSyntax() {
System.out.println("");
System.out.println("\t status - outputs the results of a git status command for each git repository specified in the teb repository");
System.out.println("");
- System.out.println("\t fetch - executes a git fetch command for each inactive git repository specified in the teb repository");
+ System.out.println("\t fetch [PROJECT_STATUS] - executes a git fetch command for each git repository with status PROJECT_STATUS specified in the teb repository");
+ System.out.println("\t PROJECT_STATUS - allowed values are 'active' and 'inactive', if no PROJECT_STATUS is specified the default is 'inactive'");
System.out.println("");
System.out.println("\t sync - executes a git rebase origin/BRANCH command for each inactive git repository specified in the teb repository");
System.out.println("");
Please sign in to comment.
Something went wrong with that request. Please try again.