aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/reference.go
Commit message (Collapse)AuthorAgeFilesLines
* git: validate reference namesAyman Bagabas2023-11-301-0/+89
| | | | | | | | | | Check reference names format before creating branches/tags/remotes. This should probably be in a lower level somewhere in `plumbing`. Validating the names under `plumbing.NewReference*` is not possible since these functions don't return errors. Fixes: https://github.com/go-git/go-git/issues/929
* git: enable fetch with unqualified referencesArieh Schneier2023-05-251-3/+4
| | | | Signed-off-by: Arieh Schneier <15041913+AriehSchneier@users.noreply.github.com>
* git: Allow Initial Branch to be configurabletechknowlogick2023-05-211-0/+1
|
* Optimise Reference.String()Paulo Gomes2022-11-071-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Decreases allocations and bytes per operation by using string builder with a predefined size. One additional allocation has been removed by using its own implementation of Strings(). The reason behind this was due to the fact the calls to .String() are more recurrent than .Strings() and the performance impact was worth the code duplication. Benchmark results: cpu: 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz name old time/op new time/op delta ReferenceStringSymbolic-16 140ns ± 4% 40ns ± 9% -71.19% (p=0.008 n=5+5) ReferenceStringHash-16 174ns ±14% 85ns ± 4% -51.13% (p=0.008 n=5+5) ReferenceStringInvalid-16 48.9ns ± 2% 1.5ns ± 3% -96.96% (p=0.008 n=5+5) name old alloc/op new alloc/op delta ReferenceStringSymbolic-16 88.0B ± 0% 32.0B ± 0% -63.64% (p=0.008 n=5+5) ReferenceStringHash-16 176B ± 0% 144B ± 0% -18.18% (p=0.008 n=5+5) ReferenceStringInvalid-16 0.00B 0.00B ~ (all equal) name old allocs/op new allocs/op delta ReferenceStringSymbolic-16 4.00 ± 0% 1.00 ± 0% -75.00% (p=0.008 n=5+5) ReferenceStringHash-16 5.00 ± 0% 3.00 ± 0% -40.00% (p=0.008 n=5+5) ReferenceStringInvalid-16 0.00 0.00 ~ (all equal) Signed-off-by: Paulo Gomes <pjbgf@linux.com>
* minor grammatical fixesJon Eskin2022-09-221-4/+4
|
* plumbing: ReferenceName constructorsMáximo Cuadros2018-10-241-0/+30
| | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* Fix revision solver for branch and tag (#660)Anthony HAMON2017-12-011-3/+3
| | | fix Repository.ResolveRevision for branch and tag
* plumbing: moved `Reference.Is*` methods to `ReferenceName.Is*`Máximo Cuadros2017-08-021-20/+20
|
* fix reference shorteningSantiago M. Mola2017-07-071-18/+18
| | | | | Implemented according to git shorten_unambiguous_ref. See: https://github.com/git/git/blob/e0aaa1b6532cfce93d87af9bc813fb2e7a7ce9d7/refs.c#L1030
* plumbing: Reference, support slash separated branch (#302)Yusuke Hatanaka2017-03-281-2/+21
|
* plumbing: ReferenceType as StringerMáximo Cuadros2017-03-221-0/+13
|
* new repository constructors and worktreeMáximo Cuadros2017-01-281-1/+2
|
* new plumbing package (#118)Máximo Cuadros2016-11-081-0/+146
* plumbing: now core was renamed to core, and formats and clients moved inside