aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/format
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #586 from blmayer/patch-1Miguel Molina2022-11-071-5/+5
|\ | | | | Fixed some little typos
| * Fixed some little typosBrian Mayer2022-09-271-5/+5
| |
* | Merge pull request #598 from To1ne/toon-fix-gitattr-crashMáximo Cuadros2022-11-072-0/+11
|\ \ | | | | | | plumbing: gitattributes, Avoid index out of range
| * | plumbing: gitattributes, Avoid index out of rangeToon Claes2022-10-122-0/+11
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a path is deeper than the single asterisk pattern the code would crash with a "index out of range". This change checks the length of the remaining pattern before it references an element of that slice. With a single trailing asterisk paths deeper than the pattern should not get the attributes. For example with the following `.gitattributes` file: thirdparty/* linguist-vendored This is how git handles it: $ git check-attr --all thirdparty/README.md thirdparty/README.md: diff: markdown thirdparty/README.md: linguist-vendored: set $ git check-attr --all thirdparty/package/README.md thirdparty/package/README.md: diff: markdown
* | Optimize zlib reader and consolidate sync.poolsPaulo Gomes2022-11-078-117/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Use Sync.Pool pointers to optimise memory usagePaulo Gomes2022-11-074-9/+53
|/ | | | Signed-off-by: Paulo Gomes <pjbgf@linux.com>
* Fix typos (#532)Quanyi Ma2022-09-221-2/+2
|
* minor grammatical fixesJon Eskin2022-09-221-1/+1
|
* remove packfile and align to test fixturespaul.t2022-01-052-3/+2
|
* Merge branch 'master' into codecommit-ref-deltapaul.t2021-12-159-53/+70
|\
| * Merge branch 'go-git:master' into masterPaul T2021-12-1511-65/+100
| |\
| | * Merge pull request #425 from abhinav/error-stringsMáximo Cuadros2021-12-113-6/+6
| | |\ | | | | | | | | error strings: Don't capitalize, use periods, or newlines
| | | * error strings: Don't capitalize, use periods, or newlinesAbhinav Gupta2021-12-043-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * | Merge pull request #418 from abhinav/unusedMáximo Cuadros2021-12-103-33/+0
| | |\ \ | | | | | | | | | | Remove unused vars/types/funcs/fields
| | | * | Remove unused variables/types/functionsAbhinav Gupta2021-11-273-33/+0
| | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | [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.
| | * / 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.
| * | resolve external reference deltaspaul.t2021-10-111-0/+11
| | |
* | | include example codecommit pack filepaul.t2021-11-091-0/+0
| | |
* | | add codecommit packfile for testing external ref resolutionpaul.t2021-11-091-0/+14
| | |
* | | Merge branch 'go-git:master' into codecommit-ref-deltaPaul T2021-11-022-12/+30
|\ \ \ | | |/ | |/|
| * | better testsenisdenjo2021-10-271-39/+9
| | |
| * | plumbing: gitignore, Read .git/info/exclude file too.enisdenjo2021-10-272-10/+58
| |/
* / resolve external reference deltapaul.t2021-10-111-0/+11
|/
* plumbing: format/packfile, prevent large objects from being read into memory ↵zeripath2021-06-308-33/+405
| | | | | | | | | | | | | | | completely (#330) This PR adds code to prevent large objects from being read into memory from packfiles or the filesystem. Objects greater than 1Mb are now no longer directly stored in the cache or read completely into memory. This PR differs and improves the previous broken #323 by fixing several bugs in the reader and transparently wrapping ReaderAt as a Reader. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Revert "plumbing: format/packfile, prevent large objects from being read ↵v5.4.2zeripath2021-06-024-313/+0
| | | | | into memory completely (#303)" (#329) This reverts commit 720c192831a890d0a36b4c6720b60411fa4a0159.
* plumbing: format/packfile, prevent large objects from being read into memory ↵v5.4.0zeripath2021-05-124-0/+313
| | | | | | | | | | | completely (#303) This PR adds code to prevent large objects from being read into memory from packfiles or the filesystem. Objects greater than 1Mb are now no longer directly stored in the cache or read completely into memory. Signed-off-by: Andrew Thornton <art27@cantab.net>
* plumbing: format, use os.UserHomeDir()Máximo Cuadros2021-05-029-155/+72
|
* diff: Allow srcPrefix and dstPrefix to be configured (#265)Andrew Nelson2021-03-112-6/+53
| | | | | | | | | * diff: Allow srcPrefix and dstPrefix to be configured The default behavior here remains the same, but this change does allow consumers of the UnifiedEncoder to set their own path prefixes which will override the defaults of a/ and b/. * Add unit test for src/dstPrefix in encoder
* plumbing: gitignore, Fix gitconfig path in LoadSystemPatterns doc (#256)Andrew Archibald2021-03-101-1/+1
|
* Merge pull request #112 from MichaelMure/complete-configMáximo Cuadros2020-10-096-56/+369
|\ | | | | config: add missing functions for completeness
| * Add testsvince2020-08-273-9/+267
| |
| * config: add missing functions for completenessMichael Muré2020-06-243-47/+102
| |
* | Merge pull request #125 from cristaloleg/minor-linter-fixesMáximo Cuadros2020-07-161-1/+1
|\ \ | | | | | | *: minor linter fixes
| * | Minor linter fixesOleg Kovalov2020-07-061-1/+1
| | |
* | | Merge pull request #115 from blaueled/fix/gitignore-crlfMáximo Cuadros2020-07-142-11/+19
|\ \ \ | | | | | | | | .gitignore crlf fix
| * | | fix typoArne Westphal2020-06-291-1/+1
| | | |
| * | | test CRLF in GFS caseArne Westphal2020-06-291-4/+12
| | | |
| * | | replace ReadAll by bufio.scannerArne Westphal2020-06-291-6/+6
| | |/ | |/|
* | | Use EqualFold for comparisonOleg Kovalov2020-07-062-2/+2
| |/ |/|
* | fix nilOleg Kovalov2020-07-012-2/+3
| |
* | fix goreportcard warningsOleg Kovalov2020-07-0111-15/+20
|/
* Merge pull request #73 from WKBae/close_objectv5.1.0Máximo Cuadros2020-05-246-12/+41
|\ | | | | Close Reader & Writer of EncodedObject after use
| * Close Reader & Writer of EncodedObject after useKyungmin Bae2020-05-246-12/+41
| |
* | Merge branch 'master' of github.com:go-git/go-git into scope-configMáximo Cuadros2020-05-242-37/+64
|\|
| * plumbing: diff, reset color at end of line rather than at beginning of nextTom Payne2020-05-172-37/+64
| |
* | Revert "Merge pull request #20 from quorumcontrol/feature/other-configs"Máximo Cuadros2020-05-241-261/+0
|/ | | | | This reverts commit 3127ad9a44a2ee935502816065dfe39f494f583d, reversing changes made to 73c52edaad2dae256be61bd1dbbab08e1092f58e.
* plumbing: diff, refresh internalsTom Payne2020-05-011-216/+166
|
* plumbing: diff, don't emit unnecessary resetsTom Payne2020-04-303-22/+24
|
* plumbing: color, make package externalTom Payne2020-04-292-2/+2
|