From: Junio C Hamano <gitster@pobox.com>
To: Daniel Barkalow <barkalow@iabervon.org>
Cc: "Wincent Colaiuta" <win@wincent.com>,
sverre@rabbelier.nl, "Steven Walter" <stevenrwalter@gmail.com>,
"Johannes Schindelin" <Johannes.Schindelin@gmx.de>,
"André Goddard Rosa" <andre.goddard@gmail.com>,
"Kevin Ballard" <kevin@sb.org>,
"Mike Ralphson" <mike.ralphson@gmail.com>,
"Tim Harper" <timcharper@gmail.com>,
git@vger.kernel.org
Subject: Re: Re* [PATCH] "not uptodate" changed to "has local changes"
Date: Wed, 21 May 2008 00:07:29 -0700 [thread overview]
Message-ID: <7v4p8s6spa.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: alpine.LNX.1.00.0805191523060.19665@iabervon.org
Daniel Barkalow <barkalow@iabervon.org> writes:
> On Mon, 19 May 2008, Junio C Hamano wrote:
>
>> Why does *everybody* keep missing the whole point of this patch?
>
> That section needs a comment stating that it's the scripting API, not just
> an arbitrary set of messages.
Yeah, that is a very good explanation. Thanks for a constructive
suggestion for improvements.
Here is an incremental on top of the one I sent out, in case people want
to improve on it.
unpack-trees.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/unpack-trees.c b/unpack-trees.c
index da3bdc8..0de5a31 100644
--- a/unpack-trees.c
+++ b/unpack-trees.c
@@ -8,7 +8,15 @@
#include "progress.h"
#include "refs.h"
-static struct unpack_trees_error_msgs unpack_default_errors = {
+/*
+ * Error messages expected by scripts out of plumbing commands such as
+ * read-tree. Non-scripted Porcelain is not required to use these messages
+ * and in fact are encouraged to reword them to better suit their particular
+ * situation better. See how "git checkout" replaces not_uptodate_file to
+ * explain why it does not allow switching between branches when you have
+ * local changes, for example.
+ */
+static struct unpack_trees_error_msgs unpack_plumbing_errors = {
/* would_overwrite */
"Entry '%s' would be overwritten by merge. Cannot merge.",
@@ -28,7 +36,7 @@ static struct unpack_trees_error_msgs unpack_default_errors = {
#define ERRORMSG(o,fld) \
( ((o) && (o)->msgs.fld) \
? ((o)->msgs.fld) \
- : (unpack_default_errors.fld) )
+ : (unpack_plumbing_errors.fld) )
static void add_entry(struct unpack_trees_options *o, struct cache_entry *ce,
unsigned int set, unsigned int clear)
next prev parent reply other threads:[~2008-05-21 7:08 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-03 16:59 [PATCH] "not uptodate" changed to "has local changes" Tim Harper
2008-05-06 13:31 ` Mike Ralphson
2008-05-16 2:14 ` André Goddard Rosa
2008-05-16 10:25 ` Johannes Schindelin
2008-05-16 11:02 ` Holger Schurig
2008-05-16 11:50 ` Francis Moreau
2008-05-16 12:22 ` Johannes Schindelin
2008-05-16 17:12 ` Kevin Ballard
2008-05-17 3:30 ` André Goddard Rosa
2008-05-17 10:04 ` Johannes Schindelin
2008-05-17 14:44 ` Steven Walter
2008-05-17 16:12 ` Sverre Rabbelier
2008-05-17 18:44 ` Johannes Schindelin
2008-05-17 20:14 ` Sverre Rabbelier
[not found] ` <200805181032.m4IAWjE0012832@mi0.bluebottle.com>
2008-05-18 11:11 ` Sverre Rabbelier
2008-05-17 19:03 ` Re* " Junio C Hamano
2008-05-17 20:29 ` Sverre Rabbelier
2008-05-19 6:55 ` Wincent Colaiuta
2008-05-19 17:47 ` Junio C Hamano
2008-05-19 18:28 ` Sverre Rabbelier
2008-05-19 19:32 ` Daniel Barkalow
2008-05-21 7:07 ` Junio C Hamano [this message]
2008-05-17 15:08 ` Wincent Colaiuta
2008-05-17 15:32 ` Matthieu Moy
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=7v4p8s6spa.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=andre.goddard@gmail.com \
--cc=barkalow@iabervon.org \
--cc=git@vger.kernel.org \
--cc=kevin@sb.org \
--cc=mike.ralphson@gmail.com \
--cc=stevenrwalter@gmail.com \
--cc=sverre@rabbelier.nl \
--cc=timcharper@gmail.com \
--cc=win@wincent.com \
/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).