summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a91ef6e)
raw | patch | inline | side by side (parent: a91ef6e)
author | Benoit Sigoure <tsuna@lrde.epita.fr> | |
Sun, 11 Nov 2007 18:41:41 +0000 (19:41 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 12 Nov 2007 07:40:32 +0000 (23:40 -0800) |
dcommit uses rebase to sync the history with what has just been pushed to
SVN. Trying to dcommit with a dirty index is troublesome for rebase, so now
the user will get an error message if he attempts to dcommit with a dirty
index.
Signed-off-by: Benoit Sigoure <tsuna@lrde.epita.fr>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
SVN. Trying to dcommit with a dirty index is troublesome for rebase, so now
the user will get an error message if he attempts to dcommit with a dirty
index.
Signed-off-by: Benoit Sigoure <tsuna@lrde.epita.fr>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-svn.perl | patch | blob | history | |
t/t9106-git-svn-dcommit-clobber-series.sh | patch | blob | history |
diff --git a/git-svn.perl b/git-svn.perl
index ec25ea4231a062e05753f4f93a757a41062a0364..4c779b6c6d1c53030c0ed984155c885a25604e57 100755 (executable)
--- a/git-svn.perl
+++ b/git-svn.perl
sub cmd_dcommit {
my $head = shift;
+ git_cmd_try { command_oneline(qw/diff-index --quiet HEAD/) }
+ 'Cannot dcommit with a dirty index. Commit your changes first'
+ . "or stash them with `git stash'.\n";
$head ||= 'HEAD';
my @refs;
my ($url, $rev, $uuid, $gs) = working_head_info($head, \@refs);
index 7eff4cdc05635c85c354c9b2a96fe4844c682621..d59acc8d1ade041d01d5a45aa993b26919a0170c 100755 (executable)
test x\"\`sed -n -e 61p < file\`\" = x6611
"
+test_expect_failure 'attempt to dcommit with a dirty index' '
+ echo foo >>file &&
+ git add file &&
+ git svn dcommit
+'
+
test_done