git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Olaf Klischat <olaf.klischat@gmail.com>
Cc: git@vger.kernel.org, olaf@sofd.de
Subject: Re: [PATCH 1/2] git-add: -s flag added (silently ignore files)
Date: Mon, 01 Oct 2012 10:59:24 -0700	[thread overview]
Message-ID: <7vipaucbur.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <1349075700-26334-2-git-send-email-olaf.klischat@gmail.com> (Olaf Klischat's message of "Mon, 1 Oct 2012 09:14:59 +0200")

Olaf Klischat <olaf.klischat@gmail.com> writes:

> Signed-off-by: Olaf Klischat <olaf.klischat@gmail.com>
> ---

I am personally not sympathetic to the reasoning stated in the
proposed commit log message above your signed-off-by line; the
change is not justified at all.

But I'll comment on the code changes anyway.

>  builtin/add.c  |   14 +++++++++++---
>  t/t3700-add.sh |   17 ++++++++++++++++-
>  2 files changed, 27 insertions(+), 4 deletions(-)
>
> diff --git a/builtin/add.c b/builtin/add.c
> index e664100..61bb9ce 100644
> --- a/builtin/add.c
> +++ b/builtin/add.c
> @@ -313,7 +313,7 @@ static const char ignore_error[] =
>  N_("The following paths are ignored by one of your .gitignore files:\n");
>  
>  static int verbose = 0, show_only = 0, ignored_too = 0, refresh_only = 0;
> -static int ignore_add_errors, addremove, intent_to_add, ignore_missing = 0;
> +static int ignore_add_errors, addremove, intent_to_add, ignore_missing, silent_ignores = 0;
>  
>  static struct option builtin_add_options[] = {
>  	OPT__DRY_RUN(&show_only, N_("dry run")),
> @@ -329,6 +329,7 @@ static struct option builtin_add_options[] = {
>  	OPT_BOOLEAN( 0 , "refresh", &refresh_only, N_("don't add, only refresh the index")),
>  	OPT_BOOLEAN( 0 , "ignore-errors", &ignore_add_errors, N_("just skip files which cannot be added because of errors")),
>  	OPT_BOOLEAN( 0 , "ignore-missing", &ignore_missing, N_("check if - even missing - files are ignored in dry run")),
> +	OPT_BOOLEAN('s', "silent-ignores", &silent_ignores, N_("don't fail when ignored files are specified on the command line (ignore them silently)")),

I'd prefer not to see a new option whose worth hasn't been proven in
the field to squat on any short-and-sweet single letter option
name and would suggest replacing that 's' with 0, at least for now.

> @@ -339,6 +340,11 @@ static int add_config(const char *var, const char *value, void *cb)
>  		ignore_add_errors = git_config_bool(var, value);
>  		return 0;
>  	}
> +	if (!strcmp(var, "add.silentignores") ||
> +	    !strcmp(var, "add.silent-ignores")) {

The second variant is unwarranted.  We may have a variable or two
that are accepted with '-' or '_' in their names, but they are
backward compatibility measures, only to cover previous mistakes
that named them in these letters in the first place.

  reply	other threads:[~2012-10-01 17:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-01  7:14 [PATCH 0/2] git-add: -s flag (silently ignore files) Olaf Klischat
2012-10-01  7:14 ` [PATCH 1/2] git-add: -s flag added " Olaf Klischat
2012-10-01 17:59   ` Junio C Hamano [this message]
2012-10-01 18:04     ` Matthieu Moy
2012-10-01  7:15 ` [PATCH 2/2] git-add: -s flag: documentation added Olaf Klischat
2012-10-01 18:32 ` [PATCH 0/2] git-add: -s flag (silently ignore files) Junio C Hamano

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vipaucbur.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=olaf.klischat@gmail.com \
    --cc=olaf@sofd.de \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).