-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Upgrade go git #28628
Closed
Closed
Upgrade go git #28628
Changes from 19 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
67605d4
Upgrade go git
lunny 9655e24
Fix gogit index
lunny bbc825e
Merge branch 'main' into lunny/upgrade_gogit
lunny ae67b13
Merge branch 'main' into lunny/upgrade_gogit
lunny 0c21e38
Merge branch 'main' into lunny/upgrade_gogit
lunny f817132
Merge branch 'main' into lunny/upgrade_gogit
lunny 86094a4
Merge branch 'main' into lunny/upgrade_gogit
lunny 320b996
Merge branch 'main' into lunny/upgrade_gogit
lunny feb0251
Merge branch 'lunny/upgrade_gogit' of github.com:lunny/gitea into lun…
lunny f28cd54
Merge branch 'main' into lunny/upgrade_gogit
GiteaBot a61cefb
Merge branch 'main' into lunny/upgrade_gogit
lunny 4e6f5b6
Merge branch 'lunny/upgrade_gogit' of github.com:lunny/gitea into lun…
lunny 72de825
Use alternate fs required by gogit v5.11.0
harryzcy 5eb098a
Update comments
harryzcy 2a7acde
Merge pull request #31 from harryzcy/gogit-alt-fs
lunny 6b84299
Merge branch 'main' into lunny/upgrade_gogit
lunny 013d92b
Fix lint
lunny 6fb09b0
Fix test
lunny 99716af
Fix open repository
lunny 67aa03c
Fix possible bug
lunny 4f26e65
Use osfs.WithBoundOS parameter
lunny d215be2
Merge branch 'main' into lunny/upgrade_gogit
lunny File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If
altPath
is relative to the host root dir, you probably want:options.AlternatesFS = osfs.New("/")
I think this might work as well:
options.AlternatesFS = osfs.New(altPath, osfs.WithBoundOS())
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Changed in 4f26e65, but it seems I'm still not lucky.
Does this work in Windows?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My understanding is that
osfs.New("")
andosfs.New("/")
are equivalent. But looking acrossgo-git
, we seem to only use the former - for example on the default loader.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI:
osfs.New("")
is not the same asosfs.New("/")
And I think there are some other problems in go-git: go-git/go-git#1006