Re: [PATCH 2/4] push: introduce new push.default mode "simple"
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 20, 2012, 21:42 UTC
- Message-ID
- <xmqqy5pqkrl4.fsf@junio.mtv.corp.google.com>
- In-Reply-To
- <1334933944-13446-3-git-send-email-Matthieu.Moy@imag.fr>
Matthieu Moy <Matthieu.Moy@imag.fr> 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 ;-)
Show 12 quoted lines
> 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_UNSPECIFIEDI 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.
Show 11 quoted lines
> 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.