pull --rebase: exit early when the working directory is dirty
[gitweb.git] / builtin-mv.c
index 94f6dd2aad2da512bab0be2e84859eced6553cc9..fb8ffb41aaba5f6e2a8cc13207a2f2c407d6c91d 100644 (file)
@@ -256,7 +256,8 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
 
                for (i = 0; i < added.nr; i++) {
                        const char *path = added.items[i].path;
-                       add_file_to_cache(path, verbose);
+                       if (add_file_to_cache(path, verbose))
+                               die("updating index entries failed");
                }
 
                for (i = 0; i < deleted.nr; i++)