| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
*: minor linter fixes
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
This fixes an issue where exact renames detection could leave gaps
with nil changes in the added and deleted change slices. That could
lead to panics in the content rename detection and others if the
user had set OnlyExact to true.
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
|
|\
| |
| | |
Remove unnecessary text from comment
|
| | |
|
|\ \
| | |
| | | |
fix 32 bit build
|
| |/
| |
| |
| | |
Discovered while building on a Raspberry Pi
|
|/ |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
| |
|
|\
| |
| | |
plumbing/object: avoid O(N^2) string building when decoding commit message
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Most commits have relatively small messages, so this was never
noticeable. However, there are some repositories that have
semi-automated messages that can get very large (e.g.
github.com/riscv/riscv-clang and its riscv-trunk branch), on the order
of 109k lines. Changing from string += to using a bytes.Buffer reduces
the time for Commit.Decode for that specific case from 35s to 74ms.
Signed-off-by: David Symonds <dsymonds@golang.org>
|
|\ \
| | |
| | | |
git.LogOptions: add `PathFilter func(string) bool`
|
| |/
| |
| |
| |
| |
| | |
keep NewCommitFileIterFromIter for compatibilty for now
Signed-off-by: Saeed Rasooli <saeed.gnu@gmail.com>
|
| |
| |
| |
| | |
Signed-off-by: Andrew Thornton <art27@cantab.net>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the British TZ the following time:
```
1579639200 +0100
```
will be erroneously parsed as being with the GMT TZ.
This leads to multiple errors with GPG validation.
This PR fixes this by using the provided TZ information to
create a FixedZone and sets that as the TZ
Signed-off-by: Andrew Thornton <art27@cantab.net>
|
|
|
|
| |
Signed-off-by: Oleksandr Redko <oleksandr.red+github@gmail.com>
|
|
|
|
| |
Signed-off-by: knqyf263 <knqyf263@gmail.com>
|
|
|
|
| |
Signed-off-by: knqyf263 <knqyf263@gmail.com>
|
|
|
|
| |
Signed-off-by: knqyf263 <knqyf263@gmail.com>
|
|
|
|
|
|
|
| |
Since we don't check the value anyway, as it can't possibly be anything but nil.
Signed-off-by: Christian Muehlhaeuser <muesli@gmail.com>
(cherry picked from commit 293e70fbceb5c81f33a96d5705f10785c6063db9)
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
| |
When we assign a value to err, make sure to also check for it being nil
afterwards. If those were intentionally unchecked, we should remove the
assignment in the first place. Those checks certainly never harm, but please
review thoroughly and let me know.
Signed-off-by: Christian Muehlhaeuser <muesli@gmail.com>
(cherry picked from commit 19d6f42a4d814a50bd262fbb69a9b670db9756a2)
|
|
|
|
|
|
|
|
| |
- Use append instead of ranged for loop
- Simpler bool comparison
Signed-off-by: Christian Muehlhaeuser <muesli@gmail.com>
(cherry picked from commit 3918d0e1b73f5e59a8c93e2b5ae99295cef26cf9)
|
|\
| |
| | |
Create merge-base feature
|
| |
| |
| |
| | |
Signed-off-by: David Pordomingo <David.Pordomingo.F@gmail.com>
|
| |
| |
| |
| | |
Signed-off-by: Filip Navara <filip.navara@gmail.com>
|
| |
| |
| |
| | |
Signed-off-by: Filip Navara <filip.navara@gmail.com>
|
| |
| |
| |
| | |
Signed-off-by: Filip Navara <filip.navara@gmail.com>
|
| |
| |
| |
| | |
Signed-off-by: Filip Navara <filip.navara@gmail.com>
|
| |
| |
| |
| | |
Signed-off-by: Filip Navara <filip.navara@gmail.com>
|
|\ \ |
|
| | |
| | |
| | |
| | | |
Signed-off-by: Antoine GIRARD <sapk@sapk.fr>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Filip Navara <filip.navara@gmail.com>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Filip Navara <filip.navara@gmail.com>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Filip Navara <filip.navara@gmail.com>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Filip Navara <filip.navara@gmail.com>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Filip Navara <filip.navara@gmail.com>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Filip Navara <filip.navara@gmail.com>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Filip Navara <filip.navara@gmail.com>
|
|/ /
| |
| |
| | |
Signed-off-by: Filip Navara <filip.navara@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Removes path.Clean and path.Join, as they're expensive in comparison to basic
string manipulation that can be used here.
Adds bufio.Buffer pool to be used by tag, tree and commit object decoding.
Signed-off-by: Arran Walker <arran.walker@fiveturns.org>
|