Skip to content

Commit

Permalink
Add the --git-branch <branch> command
Browse files Browse the repository at this point in the history
It is often useful to be able to specify another branch than the current
one; let's not require switching branches.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
  • Loading branch information
dscho committed Sep 16, 2009
1 parent 8712fa3 commit 0193ed6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/gource.cpp
Expand Up @@ -50,6 +50,7 @@ void gource_help(std::string error) {
printf(" -e, --elasticity FLOAT elasticity of nodes\n");
printf(" -b, --background FFFFFF background colour in hex\n\n");

printf(" --git-branch specify another branch than the current one\n");
printf(" --git-log-command print the git-log command used by gource\n");
printf(" --cvs-exp-command print the cvs-exp.pl log command used by gource\n\n");

Expand Down
13 changes: 13 additions & 0 deletions src/main.cpp
Expand Up @@ -49,6 +49,19 @@ int main(int argc, char *argv[]) {
exit(0);
}

if(args == "--git-branch") {

if((i+1)>=arguments.size() || arguments[i+1].size() == 0) {
gource_help("specify a git branch");
}

gGourceGitLogCommand += " ";
gGourceGitLogCommand += arguments[++i];

continue;
}


if(args == "--cvs-exp-command") {
printf("%s\n", gGourceCvsExpLogCommand.c_str());
exit(0);
Expand Down

0 comments on commit 0193ed6

Please sign in to comment.