| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Extract billy
Billy is a new library directly extracted from go-git. It abstract
several storages systems in a filesystem interface.
More in github.com/src-d/billy
* Fix grouping in imports block
* Update billy to v1
* Re-remove fs_implementation example
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* plumbing: rename Object -> EncodedObject.
* plumbing/storer: rename ObjectStorer -> EncodedObjectStorer.
* move difftree to plumbing/difftree.
* move diff -> utils/diff
* make Object/Tag/Blob/Tree/Commit/File depend on storer.
* Object and its implementations now depend only on
storer.EncodedObjectStorer, not git.Repository.
* Tests are decoupled accordingly.
* move Object/Commit/File/Tag/Tree to plumbing/object.
* move Object/Commit/File/Tag/Tree to plumbing/object.
* move checkClose to utils/ioutil.
* move RevListObjects to plumbing/revlist.Objects.
* move DiffTree to plumbing/difftree package.
* rename files with plural nouns to singular
* plumbing/object: add GetBlob/GetCommit/GetTag/GetTree.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* format/packfile: implement delta encoding
- Added all the logic to the encoder to be able to encode ref-delta and offset-delta objects
- Created plumbing.ObjectToPack to handle deltas and standard objects when we are writting them into a packfile
- Added specific encoder delta tests, one standard object and one delta, and one standard object and two deltas
* Requested changes.
* Requested changes
|
| |
|
| |
|