From: Junio C Hamano Date: Wed, 06 May 2009 17:24:50 GMT Subject: Re: [PATCH] Fix sloppy Getopt::Long. Message-ID: <7v63gew3dp.fsf@alter.siamese.dyndns.org> In-Reply-To: <20090506161309.GC10702@curie-int> "Robin H. Johnson" writes: > On Tue, May 05, 2009 at 11:49:49PM -0700, Eric Wong wrote: >> Junio C Hamano wrote: >> > "Robin H. Johnson" writes: >> > >> > > Getopt-Long v2.38 is much stricter about sloppy getopt usage. The >> > > trailing pipe causes git-svn testcases to fail for all of the --stdin >> > > argument calls. >> > > >> > > Signed-off-by: Robin H. Johnson >> > >> > Eric, I'll take this directly to my tree. Ok? >> >> The empty "" after the "|" was intended for the set-tree command to take >> a lone "-" as a parameter to also mean "--stdin". >> >> The following should work, too, but I don't have time to test right now: >> >> + { '' => \$_stdin, 'stdin' => \$_stdin, >> + %cmt_opts, %fc_opts, } ], > I confirm that it does correctly set the $_stdin variable (tested > briefly). Wait a minute. Do you mean we would also need the above "explicit empty argument sets $_stdin"? Wasn't it your earlier analysis/claim that the caller already takes care of a lone "-"? Or do you mean "yes it would also work but it is not necessary"?