| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Fixes #191
|
| |
|
|
|
|
|
| |
Diff has handled renames by default since 2020. This change sets Name
for the renamed file in a manner similar to diffstat.
|
|
|
|
|
|
|
|
| |
This PR adds in support for generation v2 support and a couple of new
walkers to match --date-order etc options on log. This PR also fixes a
bug in the chain code and adds more tests.
Signed-off-by: Andrew Thornton <art27@cantab.net>
|
|
|
|
|
|
|
|
|
| |
Unfortunately the original variant makes some incorrect typing
assumptions about commit-graphs which make handling graph chains
difficult to do correctly. This creates a new subpackage and deprecates
the old one. It then adds support commit graph chains.
Signed-off-by: Andrew Thornton <art27@cantab.net>
|
|\
| |
| | |
plumbing: parse the encoding header of the commit object
|
| |
| |
| |
| | |
other part can re-code the commit message according to the encoding to this encoding info
|
|/
|
|
| |
Signed-off-by: Arjun Singh <ajsinghyadav00@gmail.com>
|
|\
| |
| | |
*: fix some typos
|
| |
| |
| |
| | |
Signed-off-by: Zhizhen He <hezhizhen.yi@gmail.com>
|
|/
|
|
|
|
|
|
| |
When a merge commit is created from merging a signed tag, the tag object
is embedded in the commit object. This commit adds support for this tag
data when encoding and decoding a commit object.
Signed-off-by: Aditya Sirish <aditya@saky.in>
|
|
|
|
| |
Signed-off-by: Arieh Schneier <15041913+AriehSchneier@users.noreply.github.com>
|
|
|
|
| |
Signed-off-by: Paulo Gomes <pjbgf@linux.com>
|
|
|
|
| |
Signed-off-by: Paulo Gomes <pjbgf@linux.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit enables support for extracting the SSH and X509 signatures
from (annotated) Git tags, as an initial step to support the
verification of more signatures than just PGP in go-git.
The ported logic from Git further ensures that we look for a signature
at the tail of an annotation, instead of the first signature we find
in the annotation, as this could theoretically result in a faulty
signature getting detected if part of a an annotation itself (e.g.
by being placed in the middle as part of an inherited message).
For commits, no further change is required as the current extraction
of any signature (format) from `gpgsig` in the commit header is
sufficient for manual verification.
In a future iteration, we could add `signature/ssh` and `signature/x509`
packages to further enable people to deal with verifying other
signatures than PGP. As well as adding additional methods to `Commit`
and `Tag` to provide glue between the packages and the most prominent
user-facing APIs.
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
|
|\
| |
| | |
plumbing: object, rename calculation uses too much memory
|
| |
| |
| |
| |
| |
| |
| | |
The size of the similarity matrix is not limited and can be quite big
when lots of files are deleted and added in a commit.
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Expands on the optimisations from https://github.com/fluxcd/go-git/pull/5
and ensures that zlib reader does not need to recreate a deflate
dictionary at every use.
The use of sync pools was consolidated into a new sync utils package.
name old time/op new time/op delta
Parser-16 7.51ms ± 3% 7.71ms ± 6% ~ (p=0.222 n=5+5)
name old alloc/op new alloc/op delta
Parser-16 4.65MB ± 3% 1.90MB ± 3% -59.06% (p=0.008 n=5+5)
name old allocs/op new allocs/op delta
Parser-16 3.48k ± 0% 3.32k ± 0% -4.57% (p=0.016 n=5+4)
Signed-off-by: Paulo Gomes <pjbgf@linux.com>
|
|/ |
|
|\
| |
| | |
error strings: Don't capitalize, use periods, or newlines
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Per [Go Code Review Comments][1],
> Error strings should not be capitalized (unless beginning with proper
> nouns or acronyms) or end with punctuation
staticcheck's [ST1005][2] also complains about these. For example,
```
object_walker.go:63:10: error strings should not be capitalized (ST1005)
object_walker.go:101:10: error strings should not be capitalized (ST1005)
object_walker.go:101:10: error strings should not end with punctuation or a newline (ST1005)
plumbing/format/commitgraph/file.go:17:26: error strings should not be capitalized (ST1005)
```
This fixes all instances of this issue reported by staticcheck.
[1]: https://github.com/golang/go/wiki/CodeReviewComments#error-strings
[2]: https://staticcheck.io/docs/checks/#ST1005
|
|\ \
| | |
| | | |
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.
|
| |
|
| |
|
|
|
|
| |
github.com/ProtonMail/go-crypto/openpgp (#283)
|
|\
| |
| | |
*: 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>
|