merge-recursive: porcelain messages for checkout

A porcelain message was first added in checkout.c in the commit
8ccba008 (Junio C Hamano, Sat May 17 21:03:49 2008, unpack-trees:
allow Porcelain to give different error messages) to give better feedback
in the case of merge errors.

This patch adapts the porcelain messages for the case of checkout
instead. This way, when having a checkout error, "merge" no longer
appears in the error message.

While we're there, we add an advice in the case of
would_lose_untracked_file.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Diane Gasselin
2010-08-11 10:38:05 +02:00
committed by Junio C Hamano
parent 08353ebbab
commit 23cbf11b5c
5 changed files with 31 additions and 16 deletions

View File

@ -23,8 +23,11 @@ struct merge_options {
struct string_list current_directory_set;
};
/* Sets the list of user-friendly error messages to be used by merge */
void set_porcelain_error_msgs(const char **msgs);
/*
* Sets the list of user-friendly error messages to be used by the
* command "cmd" (either merge or checkout)
*/
void set_porcelain_error_msgs(const char **msgs, const char *cmd);
/* merge_trees() but with recursive ancestor consolidation */
int merge_recursive(struct merge_options *o,