Re: [PATCH v3 6/7] Remove unused and bad gettext block from git-am
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Jul 24, 2012, 18:27 UTC
- Message-ID
- <20120724182700.GI2939@burratino>
- In-Reply-To
- <dc805486adc18bf70cea73f9c6363bb3c4cf6c2b.1343112786.git.worldhello.net@gmail.com>
Hi,
Jiang Xin wrote:
> Gettext message should not start with '-' nor '--'. Since the '-d' and > '--dotest' options do not exist in OPTIONS_SPEC variable, it's safe to > remove the block.
The above justification is not a sufficient reason to stop giving helpful advice when someone uses an option that was historically supported:
Show 9 quoted lines
> --- a/git-am.sh > +++ b/git-am.sh > @@ -413,9 +413,6 @@ it will be removed. Please do not use it anymore.") > abort=t ;; > --rebasing) > rebasing=t threeway=t ;; > - -d|--dotest) > - die "$(gettext "-d option is no longer supported. Do not use.")" > - ;;
Luckily the support was removed 4 years ago and I don't think anyone is going to run into this, so a different justification could apply.
Support for the git am -d/--dotest option was removed four years ago (see e72c7406, "am: remove support for -d .dotest", 2008-03-04) and presumably no one is trying to use it any more. Simplify the code and free the short-and-sweet "-d" option for other uses by no longer parsing it.
The motivation: xgettext copes poorly with messages starting with '-'. Rather than fixing this ancient message, let's take this as a reminder to remove it.
See http://thread.gmane.org/gmane.comp.version-control.git/75896 for context. Though also see http://thread.gmane.org/gmane.comp.security.selinux/1424/focus=1430
Hope that helps, Jonathan