summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d2b3691)
raw | patch | inline | side by side (parent: d2b3691)
author | Junio C Hamano <gitster@pobox.com> | |
Wed, 28 May 2008 21:54:02 +0000 (14:54 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 29 May 2008 00:38:21 +0000 (17:38 -0700) |
Instead, have its error percolate up through the callchain and let it be
the exit status of the main command. No semantic changes yet.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
the exit status of the main command. No semantic changes yet.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-checkout.c | patch | blob | history |
diff --git a/builtin-checkout.c b/builtin-checkout.c
index 00dc8cafd827aaffeb9f9e1b8cc7addb7fffaa8d..cc97724c87aeb975f8b6e87bc891e98f678f11ee 100644 (file)
--- a/builtin-checkout.c
+++ b/builtin-checkout.c
return 0;
}
-static void reset_clean_to_new(struct tree *tree, int quiet)
+static int reset_clean_to_new(struct tree *tree, int quiet)
{
struct unpack_trees_options opts;
struct tree_desc tree_desc;
parse_tree(tree);
init_tree_desc(&tree_desc, tree->buffer, tree->size);
if (unpack_trees(1, &tree_desc, &opts))
- exit(128);
+ return 128;
+ return 0;
}
struct checkout_opts {
return ret;
merge_trees(new->commit->tree, work, old->commit->tree,
new->name, "local", &result);
- reset_clean_to_new(new->commit->tree, opts->quiet);
+ ret = reset_clean_to_new(new->commit->tree, opts->quiet);
+ if (ret)
+ return ret;
}
}