This repository was archived by the owner on Sep 11, 2020. It is now read-only.
storage/filesystem: avoid norwfs build flag#864
Merged
mcuadros merged 1 commit intosrc-d:masterfrom Jul 6, 2018
smola:no-norwfs
Merged
storage/filesystem: avoid norwfs build flag#864mcuadros merged 1 commit intosrc-d:masterfrom smola:no-norwfs
mcuadros merged 1 commit intosrc-d:masterfrom
smola:no-norwfs
Conversation
Collaborator
Author
|
This depends on billy capabilities, which should be released soon (cc @jfontan). go-billy-siva also needs to be updated to report capabilities properly for this to work properly. |
norwfs build flag was used to work on filesystems that do not support neither opening a file in read/write mode or renaming a file (e.f. sivafs). This had two problems: - go-git could not be compiled to work properly both with regular filesystems and limited filesystems at the same time. - the norwfs trick was not available on Windows. This PR removes the norwfs build flag, as well as the windows conditional flag on the dotgit package. For the file open mode, we use the new billy capabilities, to check at runtime if the filesystem supports opening a file in read/write mode or not. For the renaming, we just try and fallback to alternative methods if billy.ErrNotSupported is returned. Signed-off-by: Santiago M. Mola <santi@mola.io>
jfontan
approved these changes
Jun 21, 2018
Contributor
|
This code depends on https://github.com/src-d/go-billy/releases/tag/v4.2.0 |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
norwfs build flag was used to work on filesystems that do not support neither opening a file in read/write mode or renaming a file (e.f. sivafs).
This had two problems:
This PR removes the norwfs build flag, as well as the windows conditional flag on the dotgit package.
For the file open mode, we use the new billy capabilities, to check at runtime if the filesystem supports opening a file in read/write mode or not.
For the renaming, we just try and fallback to alternative methods if billy.ErrNotSupported is returned.