Code

git-remote.txt: fix example url
[git.git] / git-svn.perl
index ec25ea4231a062e05753f4f93a757a41062a0364..4c779b6c6d1c53030c0ed984155c885a25604e57 100755 (executable)
@@ -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);