git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Tan <pyokagan@gmail.com>
To: git@vger.kernel.org
Cc: Stefan Beller <sbeller@google.com>,
	Johannes Schindelin <johannes.schindelin@gmx.de>,
	Paul Tan <pyokagan@gmail.com>
Subject: [PATCH v2 0/2] Improve git-pull's option parsing
Date: Tue,  2 Jun 2015 22:22:51 +0800	[thread overview]
Message-ID: <1433254973-13797-1-git-send-email-pyokagan@gmail.com> (raw)

This is a re-roll of [v1]. Thanks Johannes for the reviews last round.

Previous versions:

[v1] http://thread.gmane.org/gmane.comp.version-control.git/269249

This patch series is based on pt/pull-tests.

While parsing the command-line arguments, git-pull stops parsing at the
first unrecognized option, assuming that any subsequent options are for
git-fetch, and can thus be kept in the shell's positional parameters
list, so that it can be passed to git-fetch via the expansion of "$@".

However, certain functions in git-pull assume that the positional
parameters do not contain any options. Fix this by making git-pull
handle git-fetch's options as well at the option parsing stage.

With this change in place, we can move on to migrate git-pull to use
git-rev-parse --parseopt such that its option parsing is consistent with
the other git commands.

I believe this is the last required behavior change for my rewrite of
git-pull.sh to C.

Paul Tan (2):
  pull: handle git-fetch's options as well
  pull: use git-rev-parse --parseopt for option parsing

 Documentation/git-pull.txt |   3 --
 git-pull.sh                | 128 +++++++++++++++++++++++++++++++--------------
 t/t5520-pull.sh            |  20 +++++++
 t/t5521-pull-options.sh    |  14 +++++
 4 files changed, 122 insertions(+), 43 deletions(-)

-- 
2.1.4

             reply	other threads:[~2015-06-02 14:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-02 14:22 Paul Tan [this message]
2015-06-02 14:22 ` [PATCH v2 1/2] pull: handle git-fetch's options as well Paul Tan
2015-06-02 14:22 ` [PATCH v2 2/2] pull: use git-rev-parse --parseopt for option parsing Paul Tan
2015-06-02 20:26 ` [PATCH v2 0/2] Improve git-pull's " 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=1433254973-13797-1-git-send-email-pyokagan@gmail.com \
    --to=pyokagan@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=johannes.schindelin@gmx.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).