Skip to content

Commit

Permalink
git-svn: add -l/--local command to "git svn rebase"
Browse files Browse the repository at this point in the history
This avoids fetching new revisions remotely, and is usefuly
versus plain "git rebase" because the user does not have to
specify which remote head to rebase against.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Eric Wong authored and Junio C Hamano committed Mar 14, 2007
1 parent 27ebd6e commit dee41f3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
8 changes: 8 additions & 0 deletions Documentation/git-svn.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,14 @@ accepts. However '--fetch-all' only fetches from the current

Like 'git-rebase'; this requires that the working tree be clean
and have no uncommitted changes.
+
--
-l;;
--local;;
Do not fetch remotely; only run 'git-rebase' against the
last fetched commit from the upstream SVN.
--
+

'dcommit'::
Commit each diff from a specified head directly to the SVN
Expand Down
7 changes: 5 additions & 2 deletions git-svn.perl
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ BEGIN
$_message, $_file,
$_template, $_shared,
$_version, $_fetch_all,
$_merge, $_strategy, $_dry_run,
$_merge, $_strategy, $_dry_run, $_local,
$_prefix, $_no_checkout, $_verbose);
$Git::SVN::_follow_parent = 1;
my %remote_opts = ( 'username=s' => \$Git::SVN::Prompt::_username,
Expand Down Expand Up @@ -145,6 +145,7 @@ BEGIN
{ 'merge|m|M' => \$_merge,
'verbose|v' => \$_verbose,
'strategy|s=s' => \$_strategy,
'local|l' => \$_local,
'fetch-all|all' => \$_fetch_all,
%fc_opts } ],
'commit-diff' => [ \&cmd_commit_diff,
Expand Down Expand Up @@ -439,7 +440,9 @@ sub cmd_rebase {
command_noisy('status');
exit 1;
}
$_fetch_all ? $gs->fetch_all : $gs->fetch;
unless ($_local) {
$_fetch_all ? $gs->fetch_all : $gs->fetch;
}
command_noisy(rebase_cmd(), $gs->refname);
}

Expand Down

0 comments on commit dee41f3

Please sign in to comment.