Re: Re* [PATCH] "not uptodate" changed to "has local changes"

4 messages, 3 authors, 2016-06-15 · open the first message on its own page

Re: Re* [PATCH] "not uptodate" changed to "has local changes"

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:44:37

Wincent Colaiuta [off-list ref] writes:
El 17/5/2008, a las 21:03, Junio C Hamano escribió:
quoted
+	/* not_uptodate_file */
+	"Entry '%s' not uptodate. Cannot merge.",

Minor nit, "uptodate" is not a word. Should be either "up-to-date" or
"up to date"; most dictionaries list both.
Why does *everybody* keep missing the whole point of this patch?

Grumble.

Re: Re* [PATCH] "not uptodate" changed to "has local changes"

From: Sverre Rabbelier <hidden>
Date: 2016-06-15 22:44:37

On Mon, May 19, 2008 at 7:47 PM, Junio C Hamano [off-list ref] wrote:
Why does *everybody* keep missing the whole point of this patch?
Isn't it to make it possible to change the error messages at porcelain
level while allowing the plumbing to remain backward compatibility?

-- 
Cheers,

Sverre Rabbelier

Re: Re* [PATCH] "not uptodate" changed to "has local changes"

From: Daniel Barkalow <hidden>
Date: 2016-06-15 22:44:37

On Mon, 19 May 2008, Junio C Hamano wrote:
Wincent Colaiuta [off-list ref] writes:
quoted
El 17/5/2008, a las 21:03, Junio C Hamano escribió:
quoted
+	/* not_uptodate_file */
+	"Entry '%s' not uptodate. Cannot merge.",

Minor nit, "uptodate" is not a word. Should be either "up-to-date" or
"up to date"; most dictionaries list both.
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. For that matter, maybe those shouldn't be 
the default set, but an alternate set used (as a group) by plumbing 
programs; I don't think it's too likely that there will be a whole lot of 
new plumbing programs, and new porcelain programs that don't specify 
anything probably ought to get something more generic.

	-Daniel
*This .sig left intentionally blank*

Re: Re* [PATCH] "not uptodate" changed to "has local changes"

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:44:37

Daniel Barkalow [off-list ref] writes:
On Mon, 19 May 2008, Junio C Hamano wrote:
quoted
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)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help