fix: only add .git if no parent contains one#80
Merged
Conversation
nilslice
commented
May 8, 2024
zshipko
reviewed
May 8, 2024
|
|
||
| func hasGitRepoInParents(dir string, depth int) bool { | ||
| parent := filepath.Dir(dir) | ||
| if depth == 0 || parent == "" || parent == "." || parent == dir { |
Contributor
There was a problem hiding this comment.
i think if parent parent == "/" we probably also want to return false here
Member
Author
There was a problem hiding this comment.
Likely pedantic, but is it possible there is a .git repo there?
Member
Author
There was a problem hiding this comment.
hah I really don't know, so if you think we should return false here too I'm ok with it -- was just thinking it could be possible although pretty unrealistic?
Contributor
There was a problem hiding this comment.
no i think you're right - i was missing that parent == dir ensures that the recursion will stop at /
zshipko
approved these changes
May 8, 2024
Contributor
zshipko
left a comment
There was a problem hiding this comment.
Nice! Also tested go install which seems to work still
mamccorm
added a commit
to wolfi-dev/os
that referenced
this pull request
Dec 12, 2024
Automated CVE update. Needed a tweak to the go.mod root dir, as used to exist in sub-dir, that was [refactored in this commit](extism/cli#80). Now inherits from parent go.mod. ------------- extism/1.6.1-r0: fix GHSA-v778-237x-gjrc Advisory data: https://github.com/wolfi-dev/advisories/blob/main/extism.advisories.yaml --------- Signed-off-by: Mark McCormick <[email protected]> Co-authored-by: octo-sts[bot] <[email protected]> Co-authored-by: Mark McCormick <[email protected]>
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
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.
No description provided.