X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-svn.perl;h=4c779b6c6d1c53030c0ed984155c885a25604e57;hb=8391c60b6e08604e7023a8fff74350d6b35974af;hp=ec25ea4231a062e05753f4f93a757a41062a0364;hpb=c74d9acf20ba0c69bbd67c5b0bb3bd3c2349cebe;p=git.git diff --git a/git-svn.perl b/git-svn.perl index ec25ea423..4c779b6c6 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -374,6 +374,9 @@ sub cmd_set_tree { 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);