aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/format/index
Commit message (Collapse)AuthorAgeFilesLines
* plumbing: Add link to index-format docsAlexander Block2024-04-091-0/+2
|
* plumbing: Add tests for unknown extensions, truncated extensions and invalid ↵Alexander Block2024-04-061-0/+102
| | | | hashes
* plumbing: Implement encodeRawExtension that can be used by testsAlexander Block2024-04-061-1/+33
|
* plumbing: Properly support skipping of non-mandatory extensionsAlexander Block2024-04-061-8/+30
| | | | | | | | | Before this, go-git would prematurely bail out of extensions processing when an unknown extension was encountered. This had two issues: 1. It did not account for mandatory (lower case header) extensions 2. It did not properly update the calculated hash, leading to an "invalid checksum" error.
* plumbing: Properly detect EOF when reading index extensionsAlexander Block2024-04-051-34/+36
| | | | | | | | | Before this, go-git was relying on the peeked header to not include a valid 4 char string header. While doing this, it did not differentiate between the errournously read final hash and an unknown extension. This made it impossible to properly skip unknown optional extensions while detecting EOF early enough.
* *: Remove use of deprecated io/utilPaulo Gomes2023-05-111-2/+2
| | | | Signed-off-by: Paulo Gomes <pjbgf@linux.com>
* *: Support variable length plumbing.HashPaulo Gomes2023-03-082-4/+2
| | | | | | | | | | | | The variable length for plumbing.Hash is defined at build time, blocked by tag sha256. This approach was a trade-off between keeping backwards compatibility while making progress towards supporting SHA256 with a small amount of changes. Relates to the SHA256 implementation, defined in #706. Signed-off-by: Paulo Gomes <pjbgf@linux.com>
* sha1: Add collision resistent implementationPaulo Gomes2022-11-252-6/+6
| | | | | | | | | | | | | | | | | | | Implement the same SHA1 collision resistent algorithm used by both the Git CLI and libgit2. Only commits with input that match the unavoidable bit conditions will be further processed, which will result in different hashes. Which is the same behaviour experienced in the Git CLI and Libgit2. Users can override the hash algorithm used with: hash.RegisterHash(crypto.SHA1, sha1.New) xref links: https://github.com/libgit2/libgit2/pull/4136/commits/2dfd1294f7a694bfa9e864a9489ae3cb318a5ed0 https://github.com/git/git/commit/28dc98e343ca4eb370a29ceec4c19beac9b5c01e Signed-off-by: Paulo Gomes <pjbgf@linux.com>
* simplified sparse checkoutJohn Cai2021-11-091-0/+18
| | | | | | | | | 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.
* Support v3 indexJohn Cai2021-11-052-14/+46
| | | | | | Currently the index encoder does not support the v3 index format. This change adds support to the encoder. This helps to unlock sparse checkout.
* Minor linter fixesOleg Kovalov2020-07-061-1/+1
|
* fix nilOleg Kovalov2020-07-011-1/+1
|
* fix goreportcard warningsOleg Kovalov2020-07-012-2/+5
|
* *: migration from go-git-fixtures/v4 and go-git/gcfgMáximo Cuadros2020-03-101-1/+1
|
* *: migration from gopkg to go modulesMáximo Cuadros2020-03-105-8/+8
|
* Fix typos in comments, variables and function namesOleksandr Redko2019-10-242-4/+4
| | | | Signed-off-by: Oleksandr Redko <oleksandr.red+github@gmail.com>
* Fix typos in commentsChristian Muehlhaeuser2019-07-212-3/+3
| | | | | | Just a few simple, nit-picky typo fixes. Signed-off-by: Christian Muehlhaeuser <muesli@gmail.com>
* plumbing: format/index perf, buffered reads, reflection removalArran Walker2019-04-211-18/+19
| | | | | | | | | | Large performance increase by buffering reads. There were a few instances where binary.Read() would end up using reflection on &plumbing.Hash, rather than treating it as a byte slice. This has now been resolved. Signed-off-by: Arran Walker <arran.walker@fiveturns.org>
* plumbing: format/index: support for EOIE extension, by default on git v2.2.0Máximo Cuadros2018-11-194-4/+122
| | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* all: remove extra 's' in "mismatch"Jongmin Kim2018-09-261-1/+1
| | | | Signed-off-by: Jongmin Kim <jmkim@pukyong.ac.kr>
* plumbing: format index, Index.Add and Index.Glob methodsMáximo Cuadros2018-02-263-0/+255
| | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* all: gofmt -sferhat elmas2017-11-301-1/+1
|
* all: simplificationferhat elmas2017-11-291-7/+4
| | | | | | | | | | - no length for map initialization - don't check for boolean/error return - don't format string - use string method of bytes buffer instead of converting bytes to string - use `strings.Contains` instead of `strings.Index` - use `bytes.Equal` instead of `bytes.Compare`
* update to go-billy.v4 and go-git-fixtures.v3Máximo Cuadros2017-11-231-1/+1
| | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* plumbing/index: fix TestEncode in go 1.9Máximo Cuadros2017-09-071-1/+2
|
* *: windows support, some more fixes (2) (#536)Manuel Carmona2017-08-071-0/+7
| | | | | | | | | | | | | | * fixed windows failed test: "143 FAIL: worktree_test.go:314: WorktreeSuite.TestFilenameNormalization" * fixed windows failed test: "489: FAIL: auth_method_test.go:106: SuiteCommon.TestNewSSHAgentAuthNoAgent" * fixed windows failed test: "279 FAIL: server_test.go:50: ServerSuite.TestClone" fixed windows failed test: "298 FAIL: server_test.go:37: ServerSuite.TestPush" * fixed windows failed test: "316 FAIL: <autogenerated>:26: UploadPackSuite.TearDownSuite" * fixed windows failed test: "FAIL: <autogenerated>:6: IndexSuite.TearDownSuite"
* worktree: Remove and Move methodsMáximo Cuadros2017-05-212-0/+29
|
* plumbing: index, Entries converted in a slice of pointersMáximo Cuadros2017-04-265-11/+11
|
* format: index, Index.Entry methodMáximo Cuadros2017-04-132-5/+39
|
* worktree, reset implementation and status improvementsMáximo Cuadros2017-04-121-12/+15
|
* plumbing: format, index stringerMáximo Cuadros2017-04-111-0/+23
|
* project: move imports from srcd.works to gopkg.inAntonio Jesus Navarro Perez2017-03-075-8/+8
| | | | To be able to fix #261 we will move again to gopkg.in before v4 stable release.
* replace os.FileMode use with filemode.FileModeAlberto Cortés2017-03-012-5/+7
|
* documentation and API improvementsMáximo Cuadros2017-02-211-5/+5
|
* format/index: sort the Entries before encodeMáximo Cuadros2017-02-133-4/+28
|
* package plumbing documentation improvements (#248)Máximo Cuadros2017-02-072-304/+303
|
* documentation changesMáximo Cuadros2017-01-311-2/+3
|
* new srcd.works/go-git.v4 pathMáximo Cuadros2017-01-305-6/+6
|
* new git fixture pathMáximo Cuadros2017-01-301-1/+1
|
* Fix some typos in plumbing docs (#244)Sergio Arbeo2017-01-302-2/+2
|
* format/index: keep time.Time as zero, when decoded value is 0Máximo Cuadros2017-01-282-6/+12
|
* BaseSuite improvements, usage of file:// protoMáximo Cuadros2016-12-022-19/+19
|
* new plumbing package (#118)Máximo Cuadros2016-11-086-0/+1271
* plumbing: now core was renamed to core, and formats and clients moved inside