← 返回首页
Allow for setting git options, that are persistent across subcommand calls by bpoldrack · Pull Request #536 · gitpython-developers/GitPython · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

Allow for setting git options, that are persistent across subcommand calls#536

Merged
ankostis merged 3 commits into
gitpython-developers:masterfrom
bpoldrack:nf-persistent-git-options
Oct 19, 2016
Merged

Allow for setting git options, that are persistent across subcommand calls#536
ankostis merged 3 commits into
gitpython-developers:masterfrom
bpoldrack:nf-persistent-git-options

Conversation

Copy link
Copy Markdown
Contributor

bpoldrack commented Oct 18, 2016
edited
Loading

Currently _git_options in class Git are reset after each subcommand call. While this is appropriate in most cases, I'm in need to have options for the git executable, that are used with all calls to git on a certain repository and I can't provide this option for each and every call. Therefore I'd like to introduce the possibility to persistently set such options for a given instance of Git.

This is my first PR here, so I'm not exactly sure, what you want me to provide. CONTRIBUTING.md reads: "Write a test that fails unless your patch is present."
Where am I supposed to put such a test?
Just add it to git/test/test_git.py?

Copy link
Copy Markdown

codecov-io commented Oct 18, 2016
edited
Loading

Current coverage is 94.45% (diff: 100%)

Merging #536 into master will increase coverage by 0.02%

@@ master #536 diff @@ ========================================== Files 63 63 Lines 9736 9749 +13 Methods 0 0 Messages 0 0 Branches 0 0 ========================================== + Hits 9193 9208 +15 + Misses 543 541 -2 Partials 0 0

Powered by Codecov. Last update 9e4a454...bf8ce94

Comment thread git/test/test_git.py Outdated

# reset to empty:
self.git.set_persistent_git_options()
self.assertRaises(GitCommandError, self.git.NoOp)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

A minor flake8 reported by travis: ./git/test/test_git.py:175:43: E241 multiple spaces after ','

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

Right, forgot this one. Thanks.

ankostis merged commit aab7dc2 into gitpython-developers:master Oct 19, 2016
bpoldrack mentioned this pull request Oct 20, 2016
Copy link
Copy Markdown
Member

Byron commented Oct 22, 2016

@bpoldrack Thanks a lot for your contribution ! I am doing maintenance today, and am confident to manage to put out a new release as well.

bpoldrack deleted the nf-persistent-git-options branch October 26, 2016 03:24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

4 participants

Footer

© 2026 GitHub, Inc.