{"thread":{"id":"15855","subject":"[PATCH] t9001: use older Getopt::Long boolean prefix '--no' rather than '--no-'","startedAt":"2008-10-11T00:21:34Z","lastAt":"2008-10-11T00:44:36Z","messageCount":3,"participants":["Brandon Casey","Shawn O. Pearce"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"92776","messageId":"zAKaSrh5XLrzXloxZrj-A1EletXL_wuSGpTQgLXMT3MZYK_o3tUBfA@cipher.nrlssc.navy.mil","threadId":"15855","inReplyTo":null,"subject":"[PATCH] t9001: use older Getopt::Long boolean prefix '--no' rather than '--no-'","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2008-10-11T00:21:34Z","receivedAt":"2008-10-11T00:21:34Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"Since dbf5e1e9, the '--no-validate' option is a Getopt::Long boolean\noption. The '--no-' prefix (as in --no-validate) for boolean options\nis not supported in Getopt::Long version 2.32 which was released with\nPerl 5.8.0. This version only supports '--no' as in '--novalidate'.\nMore recent versions of Getopt::Long, such as version 2.34, support\neither prefix. So use the older form in the tests.\n\nSigned-off-by: Brandon Casey <casey@nrlssc.navy.mil>\n---\n t/t9001-send-email.sh |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh\nindex d098a01..561ae7d 100755\n--- a/t/t9001-send-email.sh\n+++ b/t/t9001-send-email.sh\n@@ -109,7 +109,7 @@ test_expect_success 'allow long lines with --no-validate' '\n \t\t--from=\"Example <nobody@example.com>\" \\\n \t\t--to=nobody@example.com \\\n \t\t--smtp-server=\"$(pwd)/fake.sendmail\" \\\n-\t\t--no-validate \\\n+\t\t--novalidate \\\n \t\t$patches longline.patch \\\n \t\t2>errors\n '\n-- \n1.6.0.2.468.gd5b83\n"},{"id":"92777","messageId":"20081011002431.GK8203@spearce.org","threadId":"15855","inReplyTo":"zAKaSrh5XLrzXloxZrj-A1EletXL_wuSGpTQgLXMT3MZYK_o3tUBfA@cipher.nrlssc.navy.mil","subject":"Re: [PATCH] t9001: use older Getopt::Long boolean prefix '--no' rather than '--no-'","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2008-10-11T00:24:31Z","receivedAt":"2008-10-11T00:24:31Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Brandon Casey <casey@nrlssc.navy.mil> wrote:\n> Since dbf5e1e9, the '--no-validate' option is a Getopt::Long boolean\n> option. The '--no-' prefix (as in --no-validate) for boolean options\n> is not supported in Getopt::Long version 2.32 which was released with\n> Perl 5.8.0. This version only supports '--no' as in '--novalidate'.\n> More recent versions of Getopt::Long, such as version 2.34, support\n> either prefix. So use the older form in the tests.\n\nOuch.\n\nShould we update our docs?\n\nActually, if 2.32 doesn't support the --no-validate syntax than\nthis is a regression in Git.  Even if it is what many would call a\nbug in Getopt::Long in Perl, I think Git 1.6.1 should still honor\n--no-validate like it did in Git 1.6.0.\n \n> diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh\n> index d098a01..561ae7d 100755\n> --- a/t/t9001-send-email.sh\n> +++ b/t/t9001-send-email.sh\n> @@ -109,7 +109,7 @@ test_expect_success 'allow long lines with --no-validate' '\n>  \t\t--from=\"Example <nobody@example.com>\" \\\n>  \t\t--to=nobody@example.com \\\n>  \t\t--smtp-server=\"$(pwd)/fake.sendmail\" \\\n> -\t\t--no-validate \\\n> +\t\t--novalidate \\\n>  \t\t$patches longline.patch \\\n>  \t\t2>errors\n>  '\n\n-- \nShawn.\n"},{"id":"92779","messageId":"h06qyD79DtpYDO2W32USeygrtpn8V6dBogiNd6y5wtPVgMNDGwbl4A@cipher.nrlssc.navy.mil","threadId":"15855","inReplyTo":"20081011002431.GK8203@spearce.org","subject":"Re: [PATCH] t9001: use older Getopt::Long boolean prefix '--no' rather than '--no-'","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2008-10-11T00:44:36Z","receivedAt":"2008-10-11T00:44:36Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"Shawn O. Pearce wrote:\n> Brandon Casey <casey@nrlssc.navy.mil> wrote:\n>> Since dbf5e1e9, the '--no-validate' option is a Getopt::Long boolean\n>> option. The '--no-' prefix (as in --no-validate) for boolean options\n>> is not supported in Getopt::Long version 2.32 which was released with\n>> Perl 5.8.0. This version only supports '--no' as in '--novalidate'.\n>> More recent versions of Getopt::Long, such as version 2.34, support\n>> either prefix. So use the older form in the tests.\n> \n> Ouch.\n> \n> Should we update our docs?\n> \n> Actually, if 2.32 doesn't support the --no-validate syntax than\n> this is a regression in Git.  Even if it is what many would call a\n> bug in Getopt::Long in Perl, I think Git 1.6.1 should still honor\n> --no-validate like it did in Git 1.6.0.\n\nIf it makes any difference, none of the other boolean options would\nwork in the documented '--no-' form either, such as --no-thread,\n--no-signed-off-by-cc, etc.  '--no-validate' is probably the only one\nthat used to work.\n\n\nUpdate the docs?\n\n---[no-]validate::\n+--[no-|no]validate::\n\nhmm. not sure.\n\n-brandon\n"}]}