Improve git-pull's option parsing
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest2 patches 1 replyIn review
- v12 patches 2 repliesSuperseded
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | pull: handle git-fetch's options as wellDocumentation/ git-pull.sh t/ +1 more | +68 | 0 replies | |
| 2/2 | pull: use git-rev-parse --parseopt for option parsinggit-pull.sh | +57 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 0/2] Improve git-pull's option parsing
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(-)
Signature · 1 line
2.1.4