X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=builtin-revert.c;h=365b330f9e1f2989683611077d260fa49abcb889;hb=5d3d1cacc139194672a6a184509bb620a19b2497;hp=62ab1fa1f484a113f45da96de8cd209a0c5c522e;hpb=a130976b71f36c73fc6279fd02beb1f798d82487;p=git.git diff --git a/builtin-revert.c b/builtin-revert.c index 62ab1fa1f..365b330f9 100644 --- a/builtin-revert.c +++ b/builtin-revert.c @@ -246,7 +246,9 @@ static int revert_or_cherry_pick(int argc, const char **argv) if (no_commit) { /* * We do not intend to commit immediately. We just want to - * merge the differences in. + * merge the differences in, so let's compute the tree + * that represents the "current" state for merge-recursive + * to work on. */ if (write_tree(head, 0, NULL)) die ("Your index file is unmerged."); @@ -256,7 +258,7 @@ static int revert_or_cherry_pick(int argc, const char **argv) if (get_sha1("HEAD", head)) die ("You do not have a valid HEAD"); wt_status_prepare(&s); - if (s.commitable || s.workdir_dirty) + if (s.commitable) die ("Dirty index: cannot %s", me); discard_cache(); }