git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Sasburg <simon.sasburg@gmail.com>
To: gitster@pobox.com
Cc: git@vger.kernel.org, Simon Sasburg <Simon.Sasburg@gmail.com>
Subject: [PATCH 3/3] Make git-svn rebase --dirty pass along --dirty to git-rebase.
Date: Thu,  1 Nov 2007 22:30:24 +0100	[thread overview]
Message-ID: <1193952624-608-4-git-send-email-Simon.Sasburg@gmail.com> (raw)
In-Reply-To: <1193952624-608-3-git-send-email-Simon.Sasburg@gmail.com>

Signed-off-by: Simon Sasburg <Simon.Sasburg@gmail.com>
---
 git-svn.perl |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/git-svn.perl b/git-svn.perl
index 22bb47b..5898a26 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -63,7 +63,7 @@ my ($_stdin, $_help, $_edit,
 	$_message, $_file,
 	$_template, $_shared,
 	$_version, $_fetch_all, $_no_rebase,
-	$_merge, $_strategy, $_dry_run, $_local,
+	$_merge, $_strategy, $_dry_run, $_local, $_dirty,
 	$_prefix, $_no_checkout, $_verbose);
 $Git::SVN::_follow_parent = 1;
 my %remote_opts = ( 'username=s' => \$Git::SVN::Prompt::_username,
@@ -169,6 +169,7 @@ my %cmd = (
 			  'verbose|v' => \$_verbose,
 			  'strategy|s=s' => \$_strategy,
 			  'local|l' => \$_local,
+			  'dirty|d' => \$_dirty,
 			  'fetch-all|all' => \$_fetch_all,
 			  %fc_opts } ],
 	'commit-diff' => [ \&cmd_commit_diff,
@@ -482,16 +483,20 @@ sub cmd_find_rev {
 }
 
 sub cmd_rebase {
-	command_noisy(qw/update-index --refresh/);
+	unless ($_dirty) {
+		command_noisy(qw/update-index --refresh/);
+	}
 	my ($url, $rev, $uuid, $gs) = working_head_info('HEAD');
 	unless ($gs) {
 		die "Unable to determine upstream SVN information from ",
 		    "working tree history\n";
 	}
 	if (command(qw/diff-index HEAD --/)) {
-		print STDERR "Cannot rebase with uncommited changes:\n";
-		command_noisy('status');
-		exit 1;
+		unless ($_dirty) {
+			print STDERR "Cannot rebase with uncommited changes:\n";
+			command_noisy('status');
+			exit 1;
+		}
 	}
 	unless ($_local) {
 		$_fetch_all ? $gs->fetch_all : $gs->fetch;
@@ -697,6 +702,7 @@ sub rebase_cmd {
 	push @cmd, '-v' if $_verbose;
 	push @cmd, qw/--merge/ if $_merge;
 	push @cmd, "--strategy=$_strategy" if $_strategy;
+	push @cmd, "--dirty" if $_dirty;
 	@cmd;
 }
 
-- 
1.5.3.4.502.g37c97

  reply	other threads:[~2007-11-01 21:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-01 21:30 [RFC PATCH 0/3] Starting rebase from dirty tree Simon Sasburg
2007-11-01 21:30 ` [PATCH 1/3] Introduce --dirty option to git-rebase, allowing you to start from a dirty state Simon Sasburg
2007-11-01 21:30   ` [PATCH 2/3] Implement --dirty for git-rebase--interactive Simon Sasburg
2007-11-01 21:30     ` Simon Sasburg [this message]
2007-11-12 19:51     ` Junio C Hamano
2007-11-01 22:30   ` [PATCH 1/3] Introduce --dirty option to git-rebase, allowing you to start from a dirty state Junio C Hamano
2007-11-01 22:36     ` Junio C Hamano
2007-11-02  5:08       ` Shawn O. Pearce

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1193952624-608-4-git-send-email-Simon.Sasburg@gmail.com \
    --to=simon.sasburg@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).