git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Improve git-pull's option parsing
@ 2015-05-18 13:54 Paul Tan
  2015-05-18 13:54 ` [PATCH 1/2] pull: handle git-fetch's options as well Paul Tan
  2015-05-18 13:54 ` [PATCH 2/2] pull: use git-rev-parse --parseopt for option parsing Paul Tan
  0 siblings, 2 replies; 5+ messages in thread
From: Paul Tan @ 2015-05-18 13:54 UTC (permalink / raw)
  To: git; +Cc: Stefan Beller, Johannes Schindelin, Paul Tan

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.

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

 git-pull.sh             | 137 ++++++++++++++++++++++++++++++++++--------------
 t/t5520-pull.sh         |  20 +++++++
 t/t5521-pull-options.sh |  14 +++++
 3 files changed, 132 insertions(+), 39 deletions(-)

-- 
2.1.4

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-05-21  8:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-18 13:54 [PATCH 0/2] Improve git-pull's option parsing Paul Tan
2015-05-18 13:54 ` [PATCH 1/2] pull: handle git-fetch's options as well Paul Tan
2015-05-18 13:54 ` [PATCH 2/2] pull: use git-rev-parse --parseopt for option parsing Paul Tan
2015-05-18 14:43   ` Johannes Schindelin
2015-05-21  8:41     ` Paul Tan

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).