commits
repository: improve CheckoutOption.Hash doc
repository: allow open non-bare repositories as bare
Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
blame: fix edge case with missing \n in content length causing mismatched length error
tree: add a Size() method for getting plaintext size
Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
Suggested by mcuadros.
Issue: src-d/go-git#982
Signed-off-by: Jeremy Stribling <strib@alum.mit.edu>
Teach ResolveRevision how to look up annotated tags
Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
references: sort: compare author timestamps when commit timestamps are equal. Fixes #725
Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
Use remote name in fetch while clone
Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
Suggested by taruti.
Signed-off-by: Jeremy Stribling <strib@alum.mit.edu>
Without reading the entire object into memory.
Signed-off-by: Jeremy Stribling <strib@alum.mit.edu>
Signed-off-by: Jeremy Stribling <strib@alum.mit.edu>
plumbing: object, Add support for Log with filenames. Fixes #826
config: Add test for Windows local paths.
git: Fix Status.IsClean() documentation
test: improve test for urlencoded user:pass
The documentation of the IsClean Method contained a negation, so it was
describing the opposite of its actual behavior.
Fixes #838
Signed-off-by: David Url <david@urld.io>
Signed-off-by: Filip Navara <navara@emclient.com>
Signed-off-by: Santiago M. Mola <santi@mola.io>
all: remove extra 's' in "mismatch"
Signed-off-by: Jongmin Kim <jmkim@pukyong.ac.kr>
storage/filesystem: keep packs open in PackfileIter
Signed-off-by: Javi Fontan <jfontan@gmail.com>
PackfileIter was not taking into account the option KeepDescriptors
and was always closing the file. This caused "file already closed"
errors when iterating packfiles in with KeepDescriptors active.
Signed-off-by: Javi Fontan <jfontan@gmail.com>
Fix potential LRU cache size issue.
Signed-off-by: kuba-- <kuba@sourced.tech>
git: Add tagging support
Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
Fix `fatal: corrupt patch` error in unified diff format
Just renaming the TagObjectOptions type to CreateTagOptions so that it's
consistent with the other option types.
Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>
Added a couple of tests for annotated tag deletion:
* The first one is a general test and should work regardless of the
fixture used - the tag object could possibly be packed, so we do a prune
*and* a repack operation before testing to see if the object was GCed
correctly.
* The second one actually creates the tag to be deleted, so that the tag
object gets created as a loose, unpacked object. This is so we can
effectively test that purning unpacked objects is now working 100%
correctly (this was failing before because tag objects were not
supported for walking).
Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>
Deleting a tag ref for an annotated tag in normal git behavior does not
delete the tag object right away. This is handled by the normal GC
process.
Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>
This is necessary to support pruning on Tag objects.
Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>
This is to avoid any ambiguity with the act of "fetching" in git in
general.
Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>
Signed-off-by: Antonio Jesus Navarro Perez <antnavper@gmail.com>
Signed-off-by: kuba-- <kuba@sourced.tech>
storage/dotgit: add KeepDescriptors option
Using equals to compare files it uses diff to do so. This can
potentially consume lots of ram. Changed the comparison to use file
offsets. If the descriptor is reused the offset is maintained.
Signed-off-by: Javi Fontan <jfontan@gmail.com>
Also delete Close from MockObjectStorage and memory storer.
Signed-off-by: Javi Fontan <jfontan@gmail.com>
Signed-off-by: Javi Fontan <jfontan@gmail.com>
This option maintains packfile file descriptors opened after reading
objects from them. It improves performance as it does not have to be
opening packfiles each time an object is needed.
Also adds Close to EncodedObjectStorer to close all the files manualy.
Signed-off-by: Javi Fontan <jfontan@gmail.com>
plumbing/storer: add ExclusiveAccess option to Storer
Clamp object timestamps before unix epoch to unix epoch
Added a couple of tests for annotated tag deletion:
* The first one is a general test and should work regardless of the
fixture used - the tag object could possibly be packed, so we do a prune
*and* a repack operation before testing to see if the object was GCed
correctly.
* The second one actually creates the tag to be deleted, so that the tag
object gets created as a loose, unpacked object. This is so we can
effectively test that purning unpacked objects is now working 100%
correctly (this was failing before because tag objects were not
supported for walking).
Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>
This option maintains packfile file descriptors opened after reading
objects from them. It improves performance as it does not have to be
opening packfiles each time an object is needed.
Also adds Close to EncodedObjectStorer to close all the files manualy.
Signed-off-by: Javi Fontan <jfontan@gmail.com>