{"thread":{"id":"7238","subject":"[PATCH] git-svn: add -l/--local command to \"git svn rebase\"","startedAt":"2007-03-13T18:40:36Z","lastAt":"2007-03-13T18:40:36Z","messageCount":1,"participants":["Eric Wong"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"37021","messageId":"11738112361307-git-send-email-normalperson@yhbt.net","threadId":"7238","inReplyTo":null,"subject":"[PATCH] git-svn: add -l/--local command to \"git svn rebase\"","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2007-03-13T18:40:36Z","receivedAt":"2007-03-13T18:40:36Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"This avoids fetching new revisions remotely, and is usefuly\nversus plain \"git rebase\" because the user does not have to\nspecify which remote head to rebase against.\n\nSigned-off-by: Eric Wong <normalperson@yhbt.net>\n---\n Documentation/git-svn.txt |    8 ++++++++\n git-svn.perl              |    7 +++++--\n 2 files changed, 13 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt\nindex 9b5a3d6..a0d34e0 100644\n--- a/Documentation/git-svn.txt\n+++ b/Documentation/git-svn.txt\n@@ -104,6 +104,14 @@ accepts.  However '--fetch-all' only fetches from the current\n \n Like 'git-rebase'; this requires that the working tree be clean\n and have no uncommitted changes.\n++\n+--\n+-l;;\n+--local;;\n+\tDo not fetch remotely; only run 'git-rebase' against the\n+\tlast fetched commit from the upstream SVN.\n+--\n++\n \n 'dcommit'::\n \tCommit each diff from a specified head directly to the SVN\ndiff --git a/git-svn.perl b/git-svn.perl\nindex 326e89f..e845789 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -56,7 +56,7 @@ my ($_stdin, $_help, $_edit,\n \t$_message, $_file,\n \t$_template, $_shared,\n \t$_version, $_fetch_all,\n-\t$_merge, $_strategy, $_dry_run,\n+\t$_merge, $_strategy, $_dry_run, $_local,\n \t$_prefix, $_no_checkout, $_verbose);\n $Git::SVN::_follow_parent = 1;\n my %remote_opts = ( 'username=s' => \\$Git::SVN::Prompt::_username,\n@@ -145,6 +145,7 @@ my %cmd = (\n \t\t\t{ 'merge|m|M' => \\$_merge,\n \t\t\t  'verbose|v' => \\$_verbose,\n \t\t\t  'strategy|s=s' => \\$_strategy,\n+\t\t\t  'local|l' => \\$_local,\n \t\t\t  'fetch-all|all' => \\$_fetch_all,\n \t\t\t  %fc_opts } ],\n \t'commit-diff' => [ \\&cmd_commit_diff,\n@@ -439,7 +440,9 @@ sub cmd_rebase {\n \t\tcommand_noisy('status');\n \t\texit 1;\n \t}\n-\t$_fetch_all ? $gs->fetch_all : $gs->fetch;\n+\tunless ($_local) {\n+\t\t$_fetch_all ? $gs->fetch_all : $gs->fetch;\n+\t}\n \tcommand_noisy(rebase_cmd(), $gs->refname);\n }\n \n-- \n1.5.0.3.316.gbd1fc\n"}]}