From: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
To: Diane Gasselin <diane.gasselin@ensimag.imag.fr>
Cc: git@vger.kernel.org,
"Clément Poulain" <clement.poulain@ensimag.imag.fr>,
"Axel Bonnet" <axel.bonnet@ensimag.imag.fr>
Subject: Re: [PATCH 1/5 v2] merge-recursive: porcelain messages for checkout
Date: Tue, 15 Jun 2010 14:36:12 +0200 [thread overview]
Message-ID: <vpqr5k8zd4z.fsf@bauges.imag.fr> (raw)
In-Reply-To: <1276604576-28092-2-git-send-email-diane.gasselin@ensimag.imag.fr> (Diane Gasselin's message of "Tue\, 15 Jun 2010 14\:22\:52 +0200")
Diane Gasselin <diane.gasselin@ensimag.imag.fr> writes:
> --- a/builtin/checkout.c
> +++ b/builtin/checkout.c
> @@ -372,6 +372,7 @@ static int merge_working_tree(struct checkout_opts *opts,
> topts.src_index = &the_index;
> topts.dst_index = &the_index;
>
> + topts.msgs = get_porcelain_error_msgs("checkout");
> topts.msgs.not_uptodate_file = "You have local changes to '%s'; cannot switch branches.";
It's nice to get accurate messages for all cases, but then why do you
keep the special-case for not_uptodate_file? If there's a good reason
for it, a comment in the code would be welcome.
> + /* would_overwrite */
> + msgs.would_overwrite = malloc(sizeof(char) * 72);
> + sprintf((char *)msgs.would_overwrite,
> + "Your local changes to '%%s' would be overwritten by %s. Aborting.",
> + cmd);
This yields:
Your local changes to 'foo' would be overwritten by checkout. Aborting.
I tend to prefer Junio's wording:
You have local changes to 'foo'; cannot switch branches.
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
prev parent reply other threads:[~2010-06-15 12:36 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-15 12:22 [PATCH 0/5 v2] unpack_trees: nicer error messages Diane Gasselin
2010-06-15 12:22 ` [PATCH 1/5 v2] merge-recursive: porcelain messages for checkout Diane Gasselin
2010-06-15 12:22 ` [PATCH 2/5 v2] unpack_trees: group errors by type Diane Gasselin
2010-06-15 12:22 ` [PATCH 3/5 v2] unpack_trees_options: update porcelain messages Diane Gasselin
2010-06-15 12:22 ` [PATCH 4/5 v2] tests: update porcelain expected message Diane Gasselin
2010-06-15 12:22 ` [PATCH 5/5 v2] t7609: test merge and checkout error messages Diane Gasselin
2010-06-15 13:09 ` Matthieu Moy
2010-06-15 13:05 ` [PATCH 3/5 v2] unpack_trees_options: update porcelain messages Matthieu Moy
2010-06-15 12:58 ` [PATCH 2/5 v2] unpack_trees: group errors by type Matthieu Moy
2010-06-15 13:15 ` Diane Gasselin
2010-06-15 13:28 ` Matthieu Moy
2010-06-15 13:40 ` Diane Gasselin
2010-06-15 12:36 ` Matthieu Moy [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=vpqr5k8zd4z.fsf@bauges.imag.fr \
--to=matthieu.moy@grenoble-inp.fr \
--cc=axel.bonnet@ensimag.imag.fr \
--cc=clement.poulain@ensimag.imag.fr \
--cc=diane.gasselin@ensimag.imag.fr \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).