| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
completely (#330)
This PR adds code to prevent large objects from being read into memory
from packfiles or the filesystem.
Objects greater than 1Mb are now no longer directly stored in the cache
or read completely into memory.
This PR differs and improves the previous broken #323 by fixing several
bugs in the reader and transparently wrapping ReaderAt as a Reader.
Signed-off-by: Andrew Thornton <art27@cantab.net>
|
|
|
|
|
| |
into memory completely (#303)" (#329)
This reverts commit 720c192831a890d0a36b4c6720b60411fa4a0159.
|
|
|
|
|
|
|
|
|
|
|
| |
completely (#303)
This PR adds code to prevent large objects from being read into memory from packfiles or the filesystem.
Objects greater than 1Mb are now no longer directly stored in the cache
or read completely into memory.
Signed-off-by: Andrew Thornton <art27@cantab.net>
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit implements the rename detection algorithms used in the
JGit implementation.
Given a list of changes, additions and deletions are extracted and
matched in two ways:
- By exact hash content: all additions and deletions are grouped by
the content hash and paired with the best match based on the file
mode and file path. All the files that cannot be paired are kept
as regular deletions and additions.
- By similar content: a matrix of addition and deletion pairs with
all possible combinations is created and scored by how similar the
content is between both files as well as how similar the file path
is. The pairs with the best score and whose score is equal or
greater than a threshold are paired and turned into a rename.
All the files that cannot be paired are kept as regular deletions
and additions.
DiffTree and DiffTreeContext will not return the changes with renames
detected for compatibility reasons, although this will change in v6
so that detecting renames is the default behaviour.
A new function DiffTreeWithOptions has been added to configure the
parameters for the rename detection to control the score threshold,
the limit of renames and whether to use similar content detection in
the detection.
More information:
- https://github.com/eclipse/jgit/blob/master/org.eclipse.jgit/src/org/eclipse/jgit/diff/RenameDetector.java
- https://github.com/eclipse/jgit/blob/master/org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityRenameDetector.java
- https://github.com/eclipse/jgit/blob/master/org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityIndex.java
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
|
| |
|
|
|
|
| |
Signed-off-by: Oleksandr Redko <oleksandr.red+github@gmail.com>
|
|
|
|
| |
Signed-off-by: Stuart Jansen <sjansen@buscaluz.org>
|
|
|
|
|
|
|
| |
No need to convert these values, they're already of the right type.
Signed-off-by: Christian Muehlhaeuser <muesli@gmail.com>
(cherry picked from commit a1d8a7ac8bd0e4aff0f27dbb8bb37b8bd13a1346)
|
|
|
|
| |
Signed-off-by: Arran Walker <arran.walker@fiveturns.org>
|
|
|
|
|
|
|
|
|
|
| |
Large performance increase by buffering reads.
There were a few instances where binary.Read() would end up using reflection on
&plumbing.Hash, rather than treating it as a byte slice. This has now been
resolved.
Signed-off-by: Arran Walker <arran.walker@fiveturns.org>
|
|
|
|
| |
Signed-off-by: Vadim Markovtsev <vadim@sourced.tech>
|
|
|
|
|
|
| |
Fixes https://github.com/src-d/go-git/issues/1083
Signed-off-by: Vadim Markovtsev <vadim@sourced.tech>
|
|
|
|
|
|
| |
Fixes #1057
Signed-off-by: Vadim Markovtsev <vadim@sourced.tech>
|
|\
| |
| | |
plumbing: add context to allow cancel on diff/patch computing
|
| |
| |
| |
| | |
Signed-off-by: Marc Barussaud <marc.barussaud@orange.com>
|
|/
|
|
|
|
|
| |
According to library documentation :
https://github.com/sergi/go-diff/blob/master/diffmatchpatch/diff.go#L391
Signed-off-by: Marc Barussaud <marc.barussaud@orange.com>
|
|
|
|
| |
Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
|
| |
|
|
|
|
| |
Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Some multibyte characters can have multiple representations. Before
comparing strings, we need to normalize them. In this case we're
normalizing to normalized form C, but it shouldn't matter as long as
both strings are normalized to the same form.
Fixes https://github.com/src-d/go-git/issues/495
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
- Added Patch interface
- Added a Unified Diff encoder from Patches
- Added Change method to generate Patches
- Added Changes method to generate Patches
- Added Tree method to generate Patches
- Added Commit method to generate Patches
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
To be able to fix #261 we will move again to gopkg.in before v4 stable release.
|
| |
|
|
|
|
|
|
|
|
|
| |
Fix #275 .
It was not possible to write a test for this issue as the original fsnoder didn't support filenames with length > 1. Therefore this patch has 3 commits:
add support for long filenames in fsnoder.
add a test case for the issue using the new long filenames from step 1.
fix the issue by comparing paths level by level instead of lexigographically over the whole path.
|
|
|
|
| |
Action constants (Insert, Delete, Modify) have type int instead of
Action. This patch make them Actions.
|
| |
|
|
|
|
|
| |
difftree for noders
|
|\
| |
| | |
Improve documentation
|
| |
| |
| |
| |
| |
| | |
* Use a proper executable example, instead of one in the comment.
* Improve wording of CheckClose godoc.
|
| | |
|
|/
|
|
|
|
|
|
| |
* add merkletrie iterator and its helper frame type
* requested changes by mcuadros
* reuqested changes: smola
|