-
Notifications
You must be signed in to change notification settings - Fork 181
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
git: always set GIT_CEILING_DIRECTORIES #636
Merged
Merged
Conversation
This file contains 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
`dict(kwargs.pop('env', os.environ))` to avoid modifying input args.
|
Ok fixed in 0196448 |
By default when git don't find a repository in current working dir, it search for git repository in parent directories. This may lead to unwanted behavior when the benchmarked repository is nested inside other repo since in `checkout()` we expect to given path to be the repository and re-clone it if it's not. When the given path is not a repository we may run git commands (like a checkout) on unrelated repo. This bug occur in appveyor tests where `--basetemp` is set to a directory inside asv checkout, and `test_repo.test_repo_git()` run a checkout() after `rm -rf .git` causing tests to run a `git checkout -f master` on asv repo. Always set GIT_CEILING_DIRECTORIES to parent directory of the repo path to avoid git looking at parent directories. We don't have similar issue with hglib since it use the `-R` option to explicitly set the repository root.
Needs some tuning and a test (I'll take a look now) |
|
pv
force-pushed
the
fix-git-root
branch
2 times, most recently
from
May 1, 2018 01:26
caa40bb
to
2d1f8a0
Compare
Thanks for fixing this and added tests! |
pv
added a commit
to pv/asv
that referenced
this pull request
Jul 8, 2018
git: always set GIT_CEILING_DIRECTORIES (cherry picked from commit b3d1676)
pv
added a commit
to pv/asv
that referenced
this pull request
Jul 8, 2018
git: always set GIT_CEILING_DIRECTORIES (cherry picked from commit b3d1676)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
By default when git don't find a repository in current working dir, it
search for git repository in parent directories.
This may lead to unwanted behavior when the benchmarked repository is
nested inside other repo since in
checkout()
we expect to given pathto be the repository and re-clone it if it's not. When the given path is
not a repository we may run git commands (like a checkout) on unrelated
repo.
This bug occur in appveyor tests where
--basetemp
is set to adirectory inside asv checkout, and
test_repo.test_repo_git()
run acheckout() after
rm -rf .git
causing tests to run agit checkout -f master
on asv repo.We don't have similar issue with hglib since it use the
-R
option toexplicitly set the repository root.