summaryrefslogtreecommitdiff
path: root/git-svn.perl
diff options
context:
space:
mode:
authorSeth Falcon <seth@userprimary.net>2008-05-19 20:29:17 -0700
committerJunio C Hamano <gitster@pobox.com>2008-06-01 14:29:50 -0700
commit7d45e1468331e6253d087e77d9082026320410f5 (patch)
treeb2ffc65da4ae65636fdd0d99e2600ae4f2ce9b01 /git-svn.perl
parentd72ab8c8921f74b64be029235d4d2cdd9dcb87b9 (diff)
downloadgit-7d45e1468331e6253d087e77d9082026320410f5.tar.gz
Add a --dry-run option to git-svn rebase
When working with multiple branches in an svn repository, it can be useful to verify the svn repository and local tracking branch that will be used for the rebase operation. Signed-off-by: Seth Falcon <seth@userprimary.net> Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-svn.perl')
-rwxr-xr-xgit-svn.perl6
1 files changed, 6 insertions, 0 deletions
diff --git a/git-svn.perl b/git-svn.perl
index ff83358799..dcb8b779c8 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');