| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| | |
jfontan/fix/make-sure-original-data-is-saved-before-creanup
plumbing: format/packfile, fix panic retrieving object hash.
|
| |
| |
| |
| | |
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In some cases the original data is not saved before it is cleaned
and forces a panic when it's needed.
The change adds ObjectToPack.CleanOriginal to be used to clean original
object instead of:
object.Original = nil
Now when the Original data is freed because it's no longer in the pack
window a SetOriginal call is done to make sure that Size, Hash and Size
data is not lost.
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
|\
| |
| | |
Fix mistyping
|
|/
|
|
| |
Signed-off-by: Dmitry Labutin <dmitry@labutin.com>
|
|\
| |
| | |
storage/filesystem/shallow: fix error checking
|
|/
|
|
| |
Signed-off-by: ferhat elmas <elmas.ferhat@gmail.com>
|
|\
| |
| | |
plumbing: format/packfile, fix crash with cycle deltas
|
| |
| |
| |
| |
| |
| |
| | |
SetOriginal now skips setting resolved values if the provided
object is nil. BackToOriginal also skips nil Original objects.
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Resolving cycles relied on ObjectToPack objects having Original. This
is no longer true with the changes from #720. This commit changes:
* Save original type, hash and size in ObjectToPack
* Use SetObject to set both Original and resolved type, hash and size
* Restore original object before using BackToOriginal (cycle resolution)
* Update encoder test to check this case
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
|/
|
|
| |
Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
|
|\
| |
| | |
plumbing: packfile, Add a buffer to crc writer
|
| |
| |
| |
| | |
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
|/
|
|
|
|
|
|
|
|
|
| |
crc update with block smaller than 16 bytes uses a slower version of the
function. ReadByte is heavily used by zlib inflate so most of the time
crc is update byte by byte.
A new Flush method is added to the scanner to flush this crc writer
cache. It is only called when the Scanner reader is a teeReader.
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
|\
| |
| | |
Support for clone without checkout (git clone -n)
|
|/ |
|
|\
| |
| |
| |
| | |
jfontan/improvement/cache-delete-more-than-one-object
plumbing: cache, modify cache to delete more than one item to free space
|
| |
| |
| |
| | |
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
| |
| |
| |
| | |
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
|/
|
|
|
|
|
|
|
|
|
| |
The previous version could only delete the oldest used object. If the
object to cache was bigger than the space freed it could not be added.
Also the decoder adds bases to the cache when they are needed.
This change increases the speed creating indexes 2x.
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
|
|
|
| |
Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
|
|\
| |
| | |
add branch add/remove example
|
| | |
|
|\ \
| | |
| | | |
Clean reconstructed objects outside pack window
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Object walk reconstructs delta objects but these are not cleaned up
after they got out the pack window. Without this change all
reconstructed objects reside in memory.
restoreOriginal call is moved before calling Size(). Now we can not
guarantee that the object is already undeltified.
Signed-off-by: Javi Fontan <javier@sourced.tech>
|
|\ \
| |/
|/| |
Set default pack window size in config
|
| |
| |
| |
| | |
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
| |
| |
| |
| | |
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
|/
|
|
|
|
|
|
| |
Config is not initialized with the default window size. Without this the
window size is 0 by default and packfile code is unable to generate
deltas.
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
|\
| |
| | |
fix typo
|
|/ |
|
|\
| |
| | |
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: Máximo Cuadros <mcuadros@gmail.com>
|
| |
| |
| |
| | |
Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
|
|\ \
| | |
| | | |
plumbing: cache, enforce the use of cache in packfile decoder
|
| | |
| | |
| | |
| | | |
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
| | |
| | |
| | |
| | | |
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>
|
|\ \
| |/
|/| |
plumbing: packafile, improve delta reutilization
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Remove wrong 'if' on delta selector that causes poor delta reutilizations
- packfile.Encoder now can write deltas and objects in a non specific order
- ObjectToPack now saves the Offset on the packfile to be able to obtain base
offset in a recursive manner and write them before the delta itself
- Added encoder test to check cyclic delta chains
- Check the output packfile hash in all encoder tests
Signed-off-by: Antonio Jesus Navarro Perez <antnavper@gmail.com>
|
|\ \
| | |
| | | |
git: Worktree.Grep() support multiple patterns and pathspecs
|
| | |
| | |
| | |
| | | |
Signed-off-by: Sunny <me@darkowlzz.space>
|
|\ \ \
| |_|/
|/| | |
README.md update
|
| | |
| | |
| | |
| | | |
Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
|
|\ \ \
| |_|/
|/| | |
*: simplication
|