| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: knqyf263 <knqyf263@gmail.com>
|
|
|
|
| |
Signed-off-by: knqyf263 <knqyf263@gmail.com>
|
|
|
|
| |
Signed-off-by: knqyf263 <knqyf263@gmail.com>
|
|
|
|
| |
Signed-off-by: knqyf263 <knqyf263@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
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)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
1) lookups on an annotated tag oid now work
2) there was a lot of complexity around detection of ambiguity, but
unlike git, ambiguous refs are rejected (which causes bugs like
#823). The new code matches rev-parse's behavior (prefer the OID),
though there is no warning path to report the same warning.
Signed-off-by: Mike Lundy <mike@fluffypenguin.org>
|
|
|
|
| |
Signed-off-by: niukuo <niukuo@gmail.com>
|
|
|
|
|
|
| |
To mimic the actual standard git behavior, we must ignore references that are pointing to wrong/unexistent objects.
Signed-off-by: Antonio Jesus Navarro Perez <antnavper@gmail.com>
|
|
|
|
| |
Signed-off-by: kuba-- <kuba@sourced.tech>
|
|
|
|
|
|
|
|
|
|
|
| |
PR #1008 introduced a regression by changing the errors returned by
PlainClone when a repository did not exist.
This change goes back to returned errors as they were in v4.7.0.
Fixes #1027
Signed-off-by: Santiago M. Mola <santi@mola.io>
|
|
|
|
| |
Signed-off-by: Fedor Korotkov <fedor.korotkov@gmail.com>
|
|
|
|
| |
Signed-off-by: Santiago M. Mola <santi@mola.io>
|
|
|
|
| |
Signed-off-by: Bartek Jaroszewski <jaroszewskibartek@gmail.com>
|
|\
| |
| | |
repository: allow open non-bare repositories as bare
|
| |
| |
| |
| | |
Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
|
| |
| |
| |
| | |
Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
|
|\ \ |
|
| |\ \
| | | |
| | | | |
Use remote name in fetch while clone
|
| | | |
| | | |
| | | |
| | | | |
Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
|
| | |/
| |/|
| | | |
plumbing: object, Add support for Log with filenames. Fixes #826
|
| | |
| | |
| | |
| | | |
Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
|
| |\ \ |
|
| | | |
| | | |
| | | |
| | | | |
Signed-off-by: kuba-- <kuba@sourced.tech>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Just renaming the TagObjectOptions type to CreateTagOptions so that it's
consistent with the other option types.
Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Added a couple of tests for annotated tag deletion:
* The first one is a general test and should work regardless of the
fixture used - the tag object could possibly be packed, so we do a prune
*and* a repack operation before testing to see if the object was GCed
correctly.
* The second one actually creates the tag to be deleted, so that the tag
object gets created as a loose, unpacked object. This is so we can
effectively test that purning unpacked objects is now working 100%
correctly (this was failing before because tag objects were not
supported for walking).
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>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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>
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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>
|
| |\ \
| | | |
| | | | |
Improve packfile reading performance
|
| | |/
| | |
| | |
| | | |
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
|
| |/
| |
| |
| |
| |
| | |
Relates to #870
Signed-off-by: Fedor Korotkov <fedor.korotkov@gmail.com>
|
| |
| |
| |
| | |
Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
|
|/
|
|
| |
Signed-off-by: Mike Lundy <mike@fluffypenguin.org>
|
|\
| |
| | |
Resolve full commit sha
|
| |
| |
| |
| | |
Signed-off-by: antham <hamonanth@gmail.com>
|
|/
|
|
|
|
|
|
|
|
| |
updateShallow substituted the previous shallow list with the one
returned by the UploadPackResponse. If the repository had previous
shallow commits these are deleted from the list.
This change adds the new shallow hashes to the old ones.
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
|
|
|
|
|
| |
updates clone to track when cloning a branch. Fixes #313
Signed-off-by: Jeremy Chambers <jeremy@thehipbot.com>
|
|
|
|
|
|
|
|
|
| |
This is the git tool's behavior that people are used to; if one runs a
git command in a repository's subdirectory, git still works.
Fixes #765.
Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
|
|
|
|
| |
Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
|
|
|
|
| |
Signed-off-by: Saeed Rasooli <saeed.gnu@gmail.com>
|
| |
|
|
|
| |
fix Repository.ResolveRevision for branch and tag
|
|
|
|
|
| |
Also, object re-packing should clean up any loose objects that were
packed.
|
| |
|
|
|
|
| |
Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
|
| |
|
| |
|
| |
|