Merge branch 'ew/empty-merge-with-dirty-index-maint' into ew/empty-merge-with-dirty...
[git/git.git] / merge-recursive.c
index 780f81a..0fc580d 100644 (file)
@@ -1954,7 +1954,7 @@ int merge_trees(struct merge_options *o,
        if (oid_eq(&common->object.oid, &merge->object.oid)) {
                struct strbuf sb = STRBUF_INIT;
 
-               if (index_has_changes(&sb)) {
+               if (!o->call_depth && index_has_changes(&sb)) {
                        err(o, _("Dirty index: cannot merge (dirty: %s)"),
                            sb.buf);
                        return 0;