| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
|
|
|
|
| |
Signed-off-by: Antonio Jesus Navarro Perez <antnavper@gmail.com>
|
|
|
|
| |
Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
|
|\
| |
| | |
dotgit: ignore filenames that don't match a hash
|
| |
| |
| |
| |
| |
| |
| | |
Suggested by mcuadros.
Issue: src-d/go-git#807
Signed-off-by: Jeremy Stribling <strib@alum.mit.edu>
|
| |
| |
| |
| |
| |
| |
| | |
For both packfiles and object files.
Issue: keybase/client#11366
Signed-off-by: Jeremy Stribling <strib@alum.mit.edu>
|
|/
|
|
|
|
|
| |
fixtures is not initialized in BenchmarkRefMultipleTimes and caused
panic.
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
|
|
|
| |
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
|
|
|
|
|
|
|
| |
Previously some close errors were losts. This is specially problematic
in go-git as lots of work is done here like generating indexes and
moving packfiles.
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
|
|
|
|
|
|
|
| |
* do not store extra bool values in the seen map
* open packfile iterators lazily
Signed-off-by: Denys Smirnov <denys@sourced.tech>
|
|
|
|
| |
Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
|
|
|
|
| |
Signed-off-by: ferhat elmas <elmas.ferhat@gmail.com>
|
|\
| |
| | |
Add a setRef and rewritePackedRefsWhileLocked versions that supports non rw fs
|
| |
| |
| |
| | |
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
| |
| |
| |
| | |
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
| |
| |
| |
| | |
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There are some filesystems that do not support opening the files in read
and write modes at the same time. The method SetRef is split in files with
an extra version that only writes the reference. It can be activated with
-tags norwfs on building.
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
| |
| |
| |
| | |
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Decoder object can make use of an object cache to speed up processing.
Previously the only way to specify it was changing manually the struct
generated by NewDecodeForFile. This lead to some instances to be created
without it and penalized performance.
Now the cache should be explicitly passed to the constructor function.
NewDecoder now creates objects with a cache using the default size.
A new helper function was added to create cache objects with the default
size as this becomes a common task now:
cache.NewObjectLRUDefault()
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
|
|
|
|
|
| |
- no unnecessary err/bool check, uses them directly
Signed-off-by: ferhat elmas <elmas.ferhat@gmail.com>
|
|
|
|
| |
This change adds a new method Alternates() in DotGit to check and
query alternate source.
|
| |
|
|
|
|
|
|
| |
Windows file system doesn't let us rename over a file while holding
that file's lock, so use rewrite as a last resort. It could result in
a partially-written file, if there's a failure at the wrong time.
|
|
|
|
| |
Windows doesn't like it when we re-open a file we already have locked.
|
|
|
|
|
|
| |
Suggested by mcuadros.
Issue: #669
|
|
|
|
|
|
|
| |
This allows the user to check whether an object exists, without
reading all the object data from storage.
Issue: KBFS-2445
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Suggested by taruti.
Issue: #13
|
|
|
|
|
|
| |
The file could have been completely replaced while waiting for the
lock, so we need to re-open, otherwise we might be reading a stale
file that has already been deleted/overwritten.
|
|
|
|
| |
Issue: KBFS-2517
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Currently this implementation is only valid for kbfsgit, since it
assumes some things about the filesystem not being updated during the
packing, and about conflict resolution rules. In the future, it would
be nice to replace this with a more general one, and move this
kbfsgit-optimized implementation into kbfsgit.
Issue: KBFS-2517
|
|
|
|
|
|
|
|
|
|
| |
- no length for map initialization
- don't check for boolean/error return
- don't format string
- use string method of bytes buffer instead of converting bytes to
string
- use `strings.Contains` instead of `strings.Index`
- use `bytes.Equal` instead of `bytes.Compare`
|
| |
|
|\ |
|
| |
| |
| |
| | |
Restore the `seen` map that avoided listing packed-refs twice.
|
| | |
|
| |
| |
| |
| | |
Issue: KBFS-2509
|
| | |
|
|/ |
|
| |
|
|
|
|
| |
Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
|
|
|
|
| |
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
|
|
|
|
| |
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
|
|
|
|
|
|
| |
Now there's only two ways of getting a reference, by checking under refs/ directory or in packed-refs. refs/ directory is checked using a direct read by reference name and packed refs are cached until they have been changed.
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
|
|
|
|
| |
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
|