Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

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

Provide feedback

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

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

FIX #535: expand also GIT_DIR var on Repo-construction#537

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Byron merged 5 commits intogitpython-developers:masterfromankostis:exp_git_dir
Oct 22, 2016

Conversation

ankostis
Copy link
Contributor

  • Ignore "empty" GIT_DIR vars.
  • Improve documentation on the constructorpath parameter.
    Minor repo-code and doc correcions.
    • Expansion of paths alsoosp.normalize() them.
    • Make Repo-fields --> class-fields to avoid initializations on
      construct.
    • Explain and renamegit.repo.fun.find_git_dir() is for submodules
      (find_submodule_git_dir()).

+ Ignore "empty" GIT_DIR vars.+ Improve documentation on the constructor `path` parameter.
+ Expansion of paths also `osp.normalize()` them.+ Make Repo-fields --> class-fields to avoid initializations onconstruct.+ Explain and rename `git.repo.fun.find_git_dir()` is for submodules(`find_submodule_git_dir()`).
@codecov-io
Copy link

codecov-io commentedOct 19, 2016
edited
Loading

Current coverage is 94.36% (diff: 96.77%)

Merging#537 intomaster will increase coverage by0.02%

@@             master       #537   diff @@==========================================  Files            63         63            Lines          9885       9892     +7     Methods           0          0            Messages          0          0            Branches          0          0          ==========================================+ Hits           9326       9335     +9+ Misses          559        557     -2  Partials          0          0

Powered byCodecov. Last updatecaa0ea7...5fac8d4

Conflicts:git/repo/base.pygit/repo/fun.pygit/test/test_submodule.py
@@ -124,6 +124,8 @@ def __init__(self, path=None, odbt=DefaultDBType, search_parent_directories=Fals
repo = Repo("~/Development/git-python.git")
repo = Repo("$REPOSITORIES/Development/git-python.git")

if `None, current-directory is used.
The :envvar:`GIT_DIR` if set and not empty takes precendance over this parameter.

Choose a reason for hiding this comment

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

The environment variable taking precedence over the specified path seems error prone and undesirable. For instance, withGIT_DIR set, you can no longer do something like this:

repo_1 = git.Repo('/path/to/repo1')repo_2 = git.Repo('/path/to/repo2')

I thinkGIT_DIR as a fallback makes sense (ifpath isNone for instance). However, is there any reason to prefer it if an explicit path is provided?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Discussion moved to original issue#535

@ByronByron merged commit4754fa1 intogitpython-developers:masterOct 22, 2016
@Byron
Copy link
Member

Thanks a lot@ankostis :) !

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@ethereonethereonethereon left review comments

Assignees
No one assigned
Labels
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@ankostis@codecov-io@Byron@ethereon

[8]ページ先頭

©2009-2025 Movatter.jp