diff options
-rw-r--r-- | Documentation/git-svn.txt | 8 | ||||
-rwxr-xr-x | git-svn.perl | 6 |
2 files changed, 12 insertions, 2 deletions
diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt index c9e4efe7f..f4cbd2f21 100644 --- a/Documentation/git-svn.txt +++ b/Documentation/git-svn.txt @@ -365,11 +365,15 @@ Passed directly to git-rebase when using 'dcommit' if a -n:: --dry-run:: -This is only used with the 'dcommit' command. +This can be used with the 'dcommit' and 'rebase' commands. -Print out the series of git arguments that would show +For 'dcommit', print out the series of git arguments that would show which diffs would be committed to SVN. +For 'rebase', display the local branch associated with the upstream svn +repository associated with the current branch and the URL of svn +repository that will be fetched from. + -- ADVANCED OPTIONS diff --git a/git-svn.perl b/git-svn.perl index ff8335879..dcb8b779c 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -177,6 +177,7 @@ my %cmd = ( 'strategy|s=s' => \$_strategy, 'local|l' => \$_local, 'fetch-all|all' => \$_fetch_all, + 'dry-run|n' => \$_dry_run, %fc_opts } ], 'commit-diff' => [ \&cmd_commit_diff, 'Commit a diff between two trees', @@ -557,6 +558,11 @@ sub cmd_rebase { die "Unable to determine upstream SVN information from ", "working tree history\n"; } + if ($_dry_run) { + print "Remote Branch: " . $gs->refname . "\n"; + print "SVN URL: " . $url . "\n"; + return; + } if (command(qw/diff-index HEAD --/)) { print STDERR "Cannot rebase with uncommited changes:\n"; command_noisy('status'); |