Add "skip_unmerged" option to unpack_trees.
[gitweb.git] / merge-recursive.c
index b34177d20f1cbbaefd232f070e1f72c677f4eafe..bdf03b1f1f7acacafebc0541309be097cc80336c 100644 (file)
@@ -333,7 +333,7 @@ static struct path_list *get_unmerged(void)
                        item->util = xcalloc(1, sizeof(struct stage_data));
                }
                e = item->util;
-               e->stages[ce_stage(ce)].mode = ntohl(ce->ce_mode);
+               e->stages[ce_stage(ce)].mode = ce->ce_mode;
                hashcpy(e->stages[ce_stage(ce)].sha, ce->sha1);
        }
 
@@ -1753,7 +1753,7 @@ int main(int argc, char *argv[])
 
        if (active_cache_changed &&
            (write_cache(index_fd, active_cache, active_nr) ||
-            close(index_fd) || commit_locked_index(lock)))
+            commit_locked_index(lock)))
                        die ("unable to write %s", get_index_file());
 
        return clean ? 0: 1;