| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
This is necessary to support pruning on Tag objects.
Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>
|
|
|
|
|
|
|
| |
This is to avoid any ambiguity with the act of "fetching" in git in
general.
Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I've mainly noticed that in using the current Tag function, that there
were lots of times that I was ignoring the ref or the object, depending
on what I needed. This was evident in the tests as well. As such, I
think it just makes more sense for a singular tag fetcher to return just
a ref, through which the caller may grab the annotation if they need it,
and if it exists.
Also, contrary to the docs on Tags, all tags have a ref, even if they
are annotated. The difference between a lightweight tag and an annotated
tag is the presence of the tag object, which the ref will point to if
the tag is annotated. As such I've adjusted the docs with an example as
to how one can get the annotation for a tag ref through the iterator.
Source: https://git-scm.com/book/en/v2/Git-Internals-Git-References,
tags section.
Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>
|
|
|
|
|
|
|
|
|
|
| |
I figured there was a way to do this without having to have
TagObjectOptions supply this in - there is.
Added support for this in and removed the object type from
TagObjectOptions.
Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The old one was created with defaults, which would have caused CI
failures in 2 years.
The new one is valid for 10 years:
> gpg --list-secret-keys
/root/.gnupg/pubring.kbx
------------------------
sec rsa4096 2018-08-22 [SC] [expires: 2028-08-19]
93A17FF01E54328546087C8E029395402EFCCD53
uid [ unknown] foo bar <foo@foo.foo>
Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>
|
|
|
|
|
|
|
|
|
|
| |
Tag messages are highly sensitive to being in the expected format,
especially when encoding/decoding for PGP verification.
As such, we do a simple trimming of whitespace on the incoming message
and add a newline on the end, to ensure there are no surprises here.
Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Tag encoding/decoding seems to be a lot more sensitive to requiring the
exact expected format in the object, which generally includes messages
canonicalized so that they have a newline on the end (even if they
didn't before).
As such, the message should be written with the newline (no need for an
extra), and the PGP signature right after that, which will be newline
split already, so there's no need to split it again.
All of this means it's very important for the caller to send the message
in the correct format - which I'm correcting in the next commit.
Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>
|
|
|
|
|
|
|
|
| |
As with the update in ec3d2a8, tag encoding needed to be corrected to
ensure extra newlines were not being added in during tag object
encoding, so that it did not corrupt the object for verification.
Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a few methods:
* CreateTag, which can be used to create both lightweight and annotated
tags with a supplied TagObjectOptions struct. PGP signing is possible as
well.
* Tag, to fetch a single tag ref. As opposed to Tags or TagObjects, this
will also fetch the tag object if it exists and return it along with the
output. Lightweight tags just return the object as nil.
* DeleteTag, to delete a tag. This simply deletes the ref. The object is
left orphaned to be GCed later.
I'm not 100% sure if DeleteTag is the correct behavior - looking for
details on exactly *what* happens to a tag object if you delete the ref
and not the tag were sparse, and groking the Git source did not really
produce much insight to the untrained eye. This may be something that
comes up in review. If deletion of the object is necessary, the
in-memory storer may require some updates to allow DeleteLooseObject to
be supported.
Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>
|
|\
| |
| | |
git: Add ability to PGP sign commits
|
| |
| |
| |
| |
| |
| | |
I'm hoping this helps get codecov to a tolerable delta. :)
Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This will not work for a signed commit as with the GPG signature being a
part of the commit, the hash is now non-deterministic.
Verification of the commit is done through the validation of the
signature.
Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>
|
| |
| |
| |
| |
| |
| |
| | |
This was added in Go 1.10 and is not supported on Go 1.9. Switched to
bytes.Buffer to ensure compatibility.
Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This adds the ability to sign commits by adding the SignKey field to
CommitOptions. If present, the commit will be signed during the
WorkTree.Commit call.
The supplied SignKey must already be decrypted by the caller.
Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The way that commit signatures were being written out was causing an
extra newline to be written at the end of the commit when the message
encoding was already taking care of this. Ultimately, this results in a
corrupt object, rendering the object unverifiable with the signature in
the commit.
Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>
|
|\ \
| |/
|/|
| |
| | |
jfontan/improvement/memory-consumption-new-packfile-parser
Improvement/memory consumption new packfile parser
|
| |
| |
| |
| | |
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
* a new hasher is created when needed
* delete unused fields
* base content is no longer kept in memory
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
|/
|
|
|
|
|
| |
It uses less memory and is faster as slices don't have to be converted
from/to MemoryObject and they are indexed by offset.
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
|\
| |
| | |
Improve packfile reading performance
|
| |
| |
| |
| | |
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
|
| |
| |
| |
| | |
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
|
| |
| |
| |
| | |
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
|
| |
| |
| |
| | |
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
|
| |
| |
| |
| | |
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
|
| |
| |
| |
| | |
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
|
| |
| |
| |
| | |
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
|
| |
| |
| |
| | |
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
|
| |
| |
| |
| | |
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
|
| |
| |
| |
| | |
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
|
| |
| |
| |
| | |
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
|
| |\
| | |
| | |
| | |
| | | |
plumbing: packfile, fix package tests
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
|
| |/
| |
| |
| | |
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
|
| |\
| | |
| | | |
Tests and indexes in packfile decoder
|
| | |
| | |
| | |
| | | |
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
| |/
| |
| |
| | |
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
| |\
| | |
| | | |
plumbing: packfile, new Packfile representation
|
| | |
| | |
| | |
| | | |
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
|
| |\ \
| | |/
| |/| |
Bugfixes and IndexStorage
|
| | |
| | |
| | |
| | | |
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
| |\|
| | |
| | | |
Feature/new packfile parser
|
| | |
| | |
| | |
| | |
| | |
| | | |
Now dotgit.PackWriter uses the new packfile.Parser and index.
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Index is also automatically generated when OnFooter is called.
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This functionality may be moved elsewhere in the future but is needed
now to fit filesystem.ObjectStorage and the new index.
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|