Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

storage/filesystem: avoid norwfs build flag #864

Merged
merged 1 commit into from
Jul 6, 2018
Merged

storage/filesystem: avoid norwfs build flag #864

merged 1 commit into from
Jul 6, 2018

Conversation

smola
Copy link
Collaborator

@smola smola commented Jun 15, 2018

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.

@smola
Copy link
Collaborator Author

smola commented Jun 15, 2018

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 <[email protected]>
@mcuadros
Copy link
Contributor

mcuadros commented Jul 6, 2018

@mcuadros mcuadros merged commit 8ad72db into src-d:master Jul 6, 2018
@smola smola deleted the no-norwfs branch July 6, 2018 10:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants