Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH 2/4] push: introduce new push.default mode "simple"

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:53:38

Matthieu Moy [off-list ref] writes:
Except for the broken-ness, this adds the last line in the warning message:
Hmm?  What brokenness?
+		      "To chose either option permanently, read about push.default in git-config(1)\n"),
Nice ;-)
quoted hunk
diff --git a/cache.h b/cache.h
index d8f6f1e..5e419a1 100644
--- a/cache.h
+++ b/cache.h
@@ -580,6 +580,7 @@ enum rebase_setup_type {
 enum push_default_type {
 	PUSH_DEFAULT_NOTHING = 0,
 	PUSH_DEFAULT_MATCHING,
+	PUSH_DEFAULT_SIMPLE,
 	PUSH_DEFAULT_UPSTREAM,
 	PUSH_DEFAULT_CURRENT,
 	PUSH_DEFAULT_UNSPECIFIED
I think SIMPLE should come between CURRENT and UPSTREAM in the order of
logical progression, i.e. CURRENT < SIMPLE < UPSTREAM, because CURRENT
is appropriate in the simplest of workflow (you clone and get master and
devel branches, work on master and push it out to master, work on devel
and push it out to devel, without any need for @{upstream}), SIMPLE is a
bit more advanced (you can take advantage of @{upstream}), and CURRENT
would be the most advanced, in the "one branch at a time" camp.
quoted hunk
diff --git a/config.c b/config.c
index 68d3294..024bc74 100644
--- a/config.c
+++ b/config.c
@@ -837,7 +839,7 @@ static int git_default_push_config(const char *var, const char *value)
 			push_default = PUSH_DEFAULT_CURRENT;
 		else {
 			error("Malformed value for %s: %s", var, value);
-			return error("Must be one of nothing, matching, "
+			return error("Must be one of simple, nothing, matching, "
 				     "tracking or current.");
And this should match.  I think

	nothing, matching, current, simple or upstream.

would be more natural.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help