aboutsummaryrefslogtreecommitdiff
path: root/builtin-mv.c
diff options
context:
space:
mode:
authorAlex Riesen <raa.lkml@gmail.com>2008-05-12 19:57:45 +0200
committerJunio C Hamano <gitster@pobox.com>2008-05-12 20:54:46 -0700
commit960b8ad1b1824b1b82c2b09a000c2119f97633a0 (patch)
tree40cd788ff264c6c81cab6d792068db419b1a7ca1 /builtin-mv.c
parent64c0d71ce91696dfe5beb4b51e3233e56c857290 (diff)
downloadgit-960b8ad1b1824b1b82c2b09a000c2119f97633a0.tar.gz
git-960b8ad1b1824b1b82c2b09a000c2119f97633a0.tar.xz
Make the exit code of add_file_to_index actually useful
Update the programs which used the function (as add_file_to_cache). Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-mv.c')
-rw-r--r--builtin-mv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin-mv.c b/builtin-mv.c
index 94f6dd2aa..fb8ffb41a 100644
--- a/builtin-mv.c
+++ b/builtin-mv.c
@@ -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++)