All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Stefan Beller <sbeller@google.com>
Cc: jrnieder@gmail.com, git@vger.kernel.org, Jens.Lehmann@web.de
Subject: Re: [PATCHv3] submodule deinit: require '--all' instead of '.' for all submodules
Date: Wed, 04 May 2016 14:49:16 -0700	[thread overview]
Message-ID: <xmqqshxxeboj.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <xmqqlh3pft91.fsf@gitster.mtv.corp.google.com> (Junio C. Hamano's message of "Wed, 04 May 2016 13:44:26 -0700")

Junio C Hamano <gitster@pobox.com> writes:

>> +	if test -n "$deinit_all" && test "$#" -ne 0
>> +	then
>> +		die "$(eval_gettext "usage: $dashless [--quiet] deinit [-f|--force] (--all | [--] <path>...)")"
>
> I doubt that "usage:" wants to go thru l10n.
>
> I suspect that it is more friendly to the user to say that in prose,
> i.e.e.g. "--all and pathspec cannot be given at the same time", than
> forcing them to grok the (alternative|possibilities).
>
>> +	fi
>> +	if test $# = 0 && test -z "$deinit_all"
>>  	then
>> -		die "$(eval_gettext "Use '.' if you really want to deinitialize all submodules")"
>> +		die "$(eval_gettext "Use '--all' if you really want to deinitialize all submodules")"
>>  	fi
>
> This is good.

By the way, while it is a very good idea to die upon

	$ git submodule deinit --all no-only-this-one

it may not be too bad if we demoted the output to "info" with clean
no-op exit when the user said

	$ git submodule deinit

IOW, the latter part _might_ be better if it were

	if test $# = 0 && test -z "$deinit_all"
	then
		echo >&2 "info: not deinitializing anything."
                echo >&2 "info: Use --all to deinitialize all submodules."
                exit 0
	fi

given that this is really about preventing mistakes from doing mass
destruction.

  parent reply	other threads:[~2016-05-04 21:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-03 22:11 [PATCH] submodule deinit: require '--all' instead of '.' for all submodules Stefan Beller
2016-05-03 22:25 ` Junio C Hamano
2016-05-03 22:28 ` Junio C Hamano
2016-05-03 22:43   ` Stefan Beller
2016-05-03 22:52     ` Junio C Hamano
2016-05-03 23:02       ` Stefan Beller
2016-05-04  0:33 ` [PATCHv2] " Stefan Beller
2016-05-04  0:47   ` Jonathan Nieder
2016-05-04  1:19   ` [PATCHv3] " Stefan Beller
2016-05-04 20:44     ` Junio C Hamano
2016-05-04 21:34       ` Stefan Beller
2016-05-04 21:43         ` Junio C Hamano
2016-05-04 21:47           ` Stefan Beller
2016-05-04 21:51             ` Junio C Hamano
2016-05-04 21:49       ` Junio C Hamano [this message]
2016-05-04 21:57         ` Stefan Beller
2016-05-04 22:06           ` 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

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

  git send-email \
    --in-reply-to=xmqqshxxeboj.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=Jens.Lehmann@web.de \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --cc=sbeller@google.com \
    /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.