All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael J Gruber <git@drmicha.warpmail.net>
To: "Santi Béjar" <santi@agolina.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCHv2 4/4] Rename push.default to push.mode
Date: Mon, 30 Mar 2009 12:42:06 +0200	[thread overview]
Message-ID: <49D0A1FE.60300@drmicha.warpmail.net> (raw)
In-Reply-To: <1238407903-28020-5-git-send-email-santi@agolina.net>

Santi Béjar venit, vidit, dixit 30.03.2009 12:11:
> push.default was too generic, and also didn't specify if it was about
> remote, refspec, branches, behaviour...

I guess we go for US spelling here, so it's "behavior" ;)

> 
> Signed-off-by: Santi Béjar <santi@agolina.net>
> ---
>  Documentation/RelNotes-1.6.3.txt |    2 +-
>  Documentation/config.txt         |    4 ++--
>  builtin-push.c                   |   16 ++++++++--------
>  cache.h                          |   14 +++++++-------
>  config.c                         |   10 +++++-----
>  environment.c                    |    2 +-
>  6 files changed, 24 insertions(+), 24 deletions(-)
> 
> diff --git a/Documentation/RelNotes-1.6.3.txt b/Documentation/RelNotes-1.6.3.txt
> index f0a2e41..67b2b66 100644
> --- a/Documentation/RelNotes-1.6.3.txt
> +++ b/Documentation/RelNotes-1.6.3.txt
> @@ -24,7 +24,7 @@ receive.denyDeleteCurrent in the receiving repository.
>  
>  When the user does not tell "git push" what to push, it has always
>  pushed matching refs.  For some people it is unexpected, and a new
> -configuration variable push.default has been introduced to allow
> +configuration variable push.mode has been introduced to allow
>  changing a different default behaviour.  To advertise the new feature,

Maybe time to change it here, too.

>  a big warning is issued if this is not configured and a git push without
>  arguments is attempted.
> diff --git a/Documentation/config.txt b/Documentation/config.txt
> index 38ab785..80bb3a6 100644
> --- a/Documentation/config.txt
> +++ b/Documentation/config.txt
> @@ -480,7 +480,7 @@ branch.<name>.remote::
>  branch.<name>.merge::
>  	It defines, together with branch.<name>.remote, the upstream branch
>  	for the given branch. It tells 'git-fetch'/'git-pull' which
> -	branch to merge and can also afect 'git-push' (see push.default).
> +	branch to merge and can also afect 'git-push' (see push.mode).

s/afect/affect/

>  	When in branch <name>, it tells 'git-fetch' the default
>  	refspec to be marked for merging in FETCH_HEAD. The value is
>  	handled like the remote part of a refspec, and must match a
> @@ -1215,7 +1215,7 @@ pull.octopus::
>  pull.twohead::
>  	The default merge strategy to use when pulling a single branch.
>  
> -push.default::
> +push.mode::
>  	Defines the action git push should take if no refspec is given
>  	on the command line, no refspec is configured in the remote, and
>  	no refspec is implied by any of the options given on the command
> diff --git a/builtin-push.c b/builtin-push.c
> index 2eabcd3..c2c4de1 100644
> --- a/builtin-push.c
> +++ b/builtin-push.c
> @@ -72,7 +72,7 @@ static const char *warn_unconfigured_push_msg[] = {
>  	"not necessarily be what you want to happen.",
>  	"",
>  	"You can specify what action you want to take in this case, and",
> -	"avoid seeing this message again, by configuring 'push.default' to:",
> +	"avoid seeing this message again, by configuring 'push.mode' to:",
>  	"  'nothing'  : Do not push anything",
>  	"  'matching' : Push all matching branches (default)",
>  	"  'tracking' : Push the current branch to whatever it is tracking",
> @@ -89,26 +89,26 @@ static void warn_unconfigured_push(void)
>  static void setup_default_push_refspecs(void)
>  {
>  	git_config(git_default_config, NULL);
> -	switch (push_default) {
> -	case PUSH_DEFAULT_UNSPECIFIED:
> +	switch (push_mode) {
> +	case PUSH_MODE_UNSPECIFIED:
>  		warn_unconfigured_push();
>  		/* fallthrough */
>  
> -	case PUSH_DEFAULT_MATCHING:
> +	case PUSH_MODE_MATCHING:
>  		add_refspec(":");
>  		break;
>  
> -	case PUSH_DEFAULT_TRACKING:
> +	case PUSH_MODE_TRACKING:
>  		setup_push_tracking();
>  		break;
>  
> -	case PUSH_DEFAULT_CURRENT:
> +	case PUSH_MODE_CURRENT:
>  		add_refspec("HEAD");
>  		break;
>  
> -	case PUSH_DEFAULT_NOTHING:
> +	case PUSH_MODE_NOTHING:
>  		die("You didn't specify any refspecs to push, and "
> -		    "push.default is \"nothing\".");
> +		    "push.mode is \"nothing\".");
>  		break;
>  	}
>  }
> diff --git a/cache.h b/cache.h
> index 641529b..1625965 100644
> --- a/cache.h
> +++ b/cache.h
> @@ -542,17 +542,17 @@ enum rebase_setup_type {
>  	AUTOREBASE_ALWAYS,
>  };
>  
> -enum push_default_type {
> -	PUSH_DEFAULT_UNSPECIFIED = -1,
> -	PUSH_DEFAULT_NOTHING = 0,
> -	PUSH_DEFAULT_MATCHING,
> -	PUSH_DEFAULT_TRACKING,
> -	PUSH_DEFAULT_CURRENT,
> +enum push_mode_type {
> +	PUSH_MODE_UNSPECIFIED = -1,
> +	PUSH_MODE_NOTHING = 0,
> +	PUSH_MODE_MATCHING,
> +	PUSH_MODE_TRACKING,
> +	PUSH_MODE_CURRENT,
>  };
>  
>  extern enum branch_track git_branch_track;
>  extern enum rebase_setup_type autorebase;
> -extern enum push_default_type push_default;
> +extern enum push_mode_type push_mode;
>  
>  #define GIT_REPO_VERSION 0
>  extern int repository_format_version;
> diff --git a/config.c b/config.c
> index b76fe4c..ba02cfb 100644
> --- a/config.c
> +++ b/config.c
> @@ -567,17 +567,17 @@ static int git_default_branch_config(const char *var, const char *value)
>  
>  static int git_default_push_config(const char *var, const char *value)
>  {
> -	if (!strcmp(var, "push.default")) {
> +	if (!strcmp(var, "push.mode")) {
>  		if (!value)
>  			return config_error_nonbool(var);
>  		else if (!strcmp(value, "nothing"))
> -			push_default = PUSH_DEFAULT_NOTHING;
> +			push_mode = PUSH_MODE_NOTHING;
>  		else if (!strcmp(value, "matching"))
> -			push_default = PUSH_DEFAULT_MATCHING;
> +			push_mode = PUSH_MODE_MATCHING;
>  		else if (!strcmp(value, "tracking"))
> -			push_default = PUSH_DEFAULT_TRACKING;
> +			push_mode = PUSH_MODE_TRACKING;
>  		else if (!strcmp(value, "current"))
> -			push_default = PUSH_DEFAULT_CURRENT;
> +			push_mode = PUSH_MODE_CURRENT;
>  		else {
>  			error("Malformed value for %s: %s", var, value);
>  			return error("Must be one of nothing, matching, "
> diff --git a/environment.c b/environment.c
> index 4696885..c925ea4 100644
> --- a/environment.c
> +++ b/environment.c
> @@ -42,7 +42,7 @@ enum safe_crlf safe_crlf = SAFE_CRLF_WARN;
>  unsigned whitespace_rule_cfg = WS_DEFAULT_RULE;
>  enum branch_track git_branch_track = BRANCH_TRACK_REMOTE;
>  enum rebase_setup_type autorebase = AUTOREBASE_NEVER;
> -enum push_default_type push_default = PUSH_DEFAULT_UNSPECIFIED;
> +enum push_mode_type push_mode = PUSH_MODE_UNSPECIFIED;
>  
>  /* Parallel index stat data preload? */
>  int core_preload_index = 0;

Your patches contain quoted-printable characters all over the place. Are
they not sent with git send-email?

Michael

  reply	other threads:[~2009-03-30 11:43 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-30 10:11 [PATCHv2 0/4] push.default and branch.<name>.{remote,merge} changes Santi Béjar
2009-03-30 10:11 ` [PATCHv2 1/4] Documentation: enhance branch.<name>.{remote,merge} Santi Béjar
2009-03-30 10:11 ` [PATCHv2 2/4] Documentation: push.default applies to all remotes Santi Béjar
2009-03-30 10:11 ` [PATCHv2 3/4] Documentation: branch.*.merge can also afect 'git-push' Santi Béjar
2009-03-30 10:35   ` Michael J Gruber
2009-03-30 16:47   ` Junio C Hamano
2009-03-30 22:06     ` Santi Béjar
2009-04-02  6:08       ` Junio C Hamano
2009-03-30 10:11 ` [PATCHv2 4/4] Rename push.default to push.mode Santi Béjar
2009-03-30 10:42   ` Michael J Gruber [this message]
2009-03-30 12:37     ` Santi Béjar
2009-03-30 13:06       ` Michael J Gruber
2009-03-30 13:45         ` Jeff King
2009-03-30 14:47           ` Michael J Gruber
2009-03-30 18:02             ` Jeff King
2009-03-31 12:55               ` Michael J Gruber
2009-03-31 13:08                 ` Jeff King

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=49D0A1FE.60300@drmicha.warpmail.net \
    --to=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=santi@agolina.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.