From dc1166e685dc54946ea4600e962e56a965962ec2 Mon Sep 17 00:00:00 2001 From: Matthieu Moy Date: Thu, 2 Sep 2010 13:57:33 +0200 Subject: Move set_porcelain_error_msgs to unpack-trees.c and rename it The function is currently dealing only with error messages, but the intent of calling it is really to notify the unpack-tree mechanics that it is running in porcelain mode. Signed-off-by: Matthieu Moy Signed-off-by: Junio C Hamano --- builtin/checkout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'builtin/checkout.c') diff --git a/builtin/checkout.c b/builtin/checkout.c index 894bb84db..00cd1645c 100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -373,7 +373,7 @@ static int merge_working_tree(struct checkout_opts *opts, topts.src_index = &the_index; topts.dst_index = &the_index; - set_porcelain_error_msgs(topts.msgs, "checkout"); + setup_unpack_trees_porcelain(topts.msgs, "checkout"); refresh_cache(REFRESH_QUIET); -- cgit v1.2.1 From e294030fe89efcdd92430b60cf9568ffbe7317a8 Mon Sep 17 00:00:00 2001 From: Matthieu Moy Date: Thu, 2 Sep 2010 13:57:34 +0200 Subject: setup_unpack_trees_porcelain: take the whole options struct as parameter This is a preparation patch to let setup_unpack_trees_porcelain set show_all_errors itself. Signed-off-by: Matthieu Moy Signed-off-by: Junio C Hamano --- builtin/checkout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'builtin/checkout.c') diff --git a/builtin/checkout.c b/builtin/checkout.c index 00cd1645c..f6caac104 100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -373,7 +373,7 @@ static int merge_working_tree(struct checkout_opts *opts, topts.src_index = &the_index; topts.dst_index = &the_index; - setup_unpack_trees_porcelain(topts.msgs, "checkout"); + setup_unpack_trees_porcelain(&topts, "checkout"); refresh_cache(REFRESH_QUIET); -- cgit v1.2.1 From 5e65ee35ddd306d6e6c86efc1c95315942f87811 Mon Sep 17 00:00:00 2001 From: Matthieu Moy Date: Thu, 2 Sep 2010 18:08:15 +0200 Subject: Move "show_all_errors = 1" to setup_unpack_trees_porcelain() Not only this makes the code clearer since setting up the porcelain error message is meant to work with show_all_errors, but this fixes a call to setup_unpack_trees_porcelain() in git_merge_trees() which did not set show_all_errors. add_rejected_path() used to double-check whether it was running in plumbing mode. This check was ineffective since it was setting show_all_errors too late for traverse_trees() to see it, and is made useless by this patch. Remove it. Signed-off-by: Matthieu Moy Signed-off-by: Junio C Hamano --- builtin/checkout.c | 1 - 1 file changed, 1 deletion(-) (limited to 'builtin/checkout.c') diff --git a/builtin/checkout.c b/builtin/checkout.c index f6caac104..f3dfb7b80 100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -392,7 +392,6 @@ static int merge_working_tree(struct checkout_opts *opts, topts.dir = xcalloc(1, sizeof(*topts.dir)); topts.dir->flags |= DIR_SHOW_IGNORED; topts.dir->exclude_per_dir = ".gitignore"; - topts.show_all_errors = 1; tree = parse_tree_indirect(old->commit ? old->commit->object.sha1 : (unsigned char *)EMPTY_TREE_SHA1_BIN); -- cgit v1.2.1