| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
This reflects the lazy hash calculation and the implications of this.
|
|\
| |
| | |
Calculate filesystem node's hash lazily.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The main motivation behind this change is to speed up status operation.
Currently it's very slow, especially for repositories with lots of ignored
files (e.g. node.js repository with node_modules directory).
One of the reasons for this slowness is the fact that traversing filesystem
involves calculating file hashes for all files, even if those hashes are
not needed in the end because the files are in gitignore.
On my machine, for a random repository with sizable (ignored) node_modules
directory this changes bring the execution time for Worktree.Status
from ~3.5s to ~1.4s. This is still very slow, but a significant improvement.
A better fix (instead of or in addition to this one) would be to avoid traversing
ignored files in the first place. However, such change seem to be more
intrusive and will require much deeper understanding of the codebase.
|
|\ \
| | |
| | | |
Ignore ModeSocket files
|
| |/ |
|
| |
| |
| |
| | |
Signed-off-by: Arjun Singh <ajsinghyadav00@gmail.com>
|
| |
| |
| |
| | |
Signed-off-by: Arjun Singh <ajsinghyadav00@gmail.com>
|
|/
|
|
| |
Signed-off-by: Zhizhen He <hezhizhen.yi@gmail.com>
|
|\
| |
| | |
Remove unused vars/types/funcs/fields
|
| |
| |
| |
| |
| |
| |
| |
| | |
[staticcheck](https://staticcheck.io/) reported a number of unused
fields, functions, types, and variables across the code.
Where possible, use them (assert unchecked errors in tests, for example)
and otherwise remove them.
|
|/
|
|
|
|
|
|
|
| |
This is the initial logic to support a simple sparse checkout where
directories to be included can be specified in CheckoutOptions.
This change doesn't fully support the sparse patterns, nor does this
change include the optimization to collapse flie entries in ithe index
that are excluded via the sparse checkout directory patterns included
under the parent directory.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
| |
Fixes #1057
Signed-off-by: Vadim Markovtsev <vadim@sourced.tech>
|
|
|
|
| |
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
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
* add merkletrie iterator and its helper frame type
* requested changes by mcuadros
* reuqested changes: smola
|
| |
|
|
|