Skip to content

Support repeated kwargs#413

Merged
nvie merged 1 commit intogitpython-developers:masterfrom
nvie:support-repeated-cmd-kwargs
Apr 19, 2016
Merged

Support repeated kwargs#413
nvie merged 1 commit intogitpython-developers:masterfrom
nvie:support-repeated-cmd-kwargs

Conversation

@nvie
Copy link
Copy Markdown
Contributor

@nvie nvie commented Apr 18, 2016

Some Git command line options are allowed to be repeated multiple times. Examples of this are the -C flag which may occur more than once to "strengthen" its effect, or the -L flag on Git blames, to select
multiple blocks of lines to blame.

$ git diff -C -C HEAD~1 HEAD
$ git blame -L 1-3 -L 12-18 HEAD -- somefile.py

This patch supports passing a list/tuple as the value part for kwargs, so that the generated Git command contain the repeated options.

Some Git command line options are allowed to be repeated multiple times.
Examples of this are the -C flag which may occur more than once to
"strengthen" its effect, or the -L flag on Git blames, to select
multiple blocks of lines to blame.

    $ git diff -C -C HEAD~1 HEAD
    $ git blame -L 1-3 -L 12-18 HEAD -- somefile.py

This patch supports passing a list/tuple as the value part for kwargs,
so that the generated Git command contain the repeated options.
@nvie nvie merged commit 504870e into gitpython-developers:master Apr 19, 2016
@nvie nvie deleted the support-repeated-cmd-kwargs branch April 19, 2016 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant