Skip to content

use git rev-parse to look for config file #894

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

bdauvergne
Copy link
Contributor

It fixes config file finding when in a separate worktree.

If fixes the issue with worktree reported in #719 (comment)

Copy link
Member

@Byron Byron left a comment

Choose a reason for hiding this comment

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

It looks like there is test breakage directly related to this commit.
Could you have a look?

@Byron
Copy link
Member

Byron commented Jul 21, 2019

Thanks a lot for the contribution - I would love to merge, but can't as long as there is test breakage. Maybe it's an easy fix.

@bdauvergne
Copy link
Contributor Author

I tried a work-around but i'm not sure of it, there is some circular dependency between the search got the .git directory in Repo and the initialization of the self.git command wrapper (the git command should be able to find the .git itself, but the late initialization has maybe some use).

@bdauvergne bdauvergne force-pushed the worktree-config-support branch 3 times, most recently from 14e53bf to f45c70a Compare July 22, 2019 14:10
@bdauvergne
Copy link
Contributor Author

And it works (I don't know the problem with appveyor, I do not think it's related to my patch).

@bdauvergne bdauvergne force-pushed the worktree-config-support branch from f45c70a to 7f12bd4 Compare July 23, 2019 08:18
@codecov-io
Copy link

Codecov Report

Merging #894 into master will decrease coverage by 0.02%.
The diff coverage is 95.45%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #894      +/-   ##
==========================================
- Coverage    93.6%   93.57%   -0.03%     
==========================================
  Files          59       59              
  Lines        9769     9787      +18     
==========================================
+ Hits         9144     9158      +14     
- Misses        625      629       +4
Impacted Files Coverage Δ
git/repo/base.py 93.57% <95.45%> (-0.6%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ce7e150...7f12bd4. Read the comment docs.

@Byron
Copy link
Member

Byron commented Aug 11, 2019

Thanks so much! I am glad you could find the time.
In the next days, GitPython 3 will be released and include the fix.

@Byron Byron merged commit 0b6b90f into gitpython-developers:master Aug 11, 2019
@bdauvergne bdauvergne deleted the worktree-config-support branch August 11, 2019 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants