diff --git a/builtin-revert.c b/builtin-revert.c
index 62ab1fa1f484a113f45da96de8cd209a0c5c522e..365b330f9e1f2989683611077d260fa49abcb889 100644 (file)
--- a/builtin-revert.c
+++ b/builtin-revert.c
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.");
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();
}