git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 0/2] Improve git-pull's option parsing

From
Paul Tan <pyokagan@gmail.com>
Date
May 18, 2015, 13:54 UTC
Message-ID
<1431957296-31534-1-git-send-email-pyokagan@gmail.com>

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
Next: Paul Tan
Message 1 of 5 in “Improve git-pull's option parsing”
  1. 0/2 Improve git-pull's option parsingPaul Tan, May 18, 2015
  2. 1/2 pull: handle git-fetch's options as wellPaul Tan, May 18, 2015
  3. 2/2 pull: use git-rev-parse --parseopt for option parsingPaul Tan, May 18, 2015
  4. Johannes SchindelinMay 18, 2015
  5. Paul TanMay 21, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.