Re: [PATCH 2/2] pull: use git-rev-parse --parseopt for option parsing
- From
Paul Tan <pyokagan@gmail.com>
- Date
- May 21, 2015, 08:41 UTC
- Message-ID
- <CACRoPnS2AwxT+0By7esubp8ctF9=gcwnr=coPDF9PEvzyyji+g@mail.gmail.com>
- In-Reply-To
- <389cf040410c499b2f382bfbcdb526d4@www.dscho.org>
Hi,
On Mon, May 18, 2015 at 10:43 PM, Johannes Schindelin <johannes.schindelin@gmx.de> wrote:
Show 20 quoted lines
> On 2015-05-18 15:54, Paul Tan wrote: > >> diff --git a/git-pull.sh b/git-pull.sh >> index 633c385..67f825c 100755 >> --- a/git-pull.sh >> +++ b/git-pull.sh >> @@ -4,13 +4,53 @@ >> # >> # Fetch one or more remote refs and merge it/them into the current HEAD. >> >> -USAGE='[-n | --no-stat] [--[no-]commit] [--[no-]squash] >> [--[no-]ff|--ff-only] [--[no-]rebase|--rebase=preserve] [-s >> strategy]... [<fetch-options>] <repo> <head>...' >> -LONG_USAGE='Fetch one or more remote refs and integrate it/them with >> the current HEAD.' >> SUBDIRECTORY_OK=Yes >> -OPTIONS_SPEC= >> +OPTIONS_KEEPDASHDASH=Yes > > I have to admit that I was puzzled by this at first. But it seems that the intention is to handle a dashdash argument as an error, therefore we have to keep it. Is my understanding correct?
Ugh, I thought we had to keep the dashdash so that we could disambiguate the arguments from the options, but it turns out that rev-parse would add its own dashdash. So, no, we don't need to keep the dashdash.
Thanks for catching this. Fixed.
Regards, Paul