aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/format
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* plumbing: diff, fix coloring of hunk contextTom Payne2020-04-292-15/+51
|
* plumbing: diff, Add initial colored output support. Fixes #33.Tom Payne2020-04-263-10/+206
|
* Document some things in format/config/merged.goWes Morgan2020-04-071-1/+39
|
* Add funcs to set global & local config in MergedWes Morgan2020-04-061-0/+8
|
* Add Merged configWes Morgan2020-04-061-0/+215
| | | | ...for reading and writing global (~/.git/config) and reading system (/etc/gitconfig) configs in addition to local repo config
* ci: based on github actionsv5.0.0Máximo Cuadros2020-03-152-15/+3
|
* *: migration from go-git-fixtures/v4 and go-git/gcfgMáximo Cuadros2020-03-1012-32/+20
|
* *: migration from gopkg to go modulesMáximo Cuadros2020-03-1050-104/+104
|
* Fix typos in comments, variables and function namesOleksandr Redko2019-10-243-5/+5
| | | | Signed-off-by: Oleksandr Redko <oleksandr.red+github@gmail.com>
* format: diff, Handle no newline at end of file. Fixes #936Stuart Jansen2019-10-132-30/+83
| | | | Signed-off-by: Stuart Jansen <sjansen@buscaluz.org>
* feat: avoid memory allocation on ApplyDelta, PatchDeltaNao YONASHIRO2019-07-311-15/+30
| | | | Signed-off-by: Nao YONASHIRO <owan.orisano@gmail.com>
* refactor: use bufPoolNao YONASHIRO2019-07-311-12/+3
| | | | Signed-off-by: Nao YONASHIRO <owan.orisano@gmail.com>
* feat: avoid memory allocation on resolveDeltasNao YONASHIRO2019-07-311-46/+53
| | | | Signed-off-by: Nao YONASHIRO <owan.orisano@gmail.com>
* feat: avoid ioutil.ReadAll on ApplyDeltaNao YONASHIRO2019-07-311-2/+15
| | | | Signed-off-by: Nao YONASHIRO <owan.orisano@gmail.com>
* *: avoid unnecessary conversionsChristian Muehlhaeuser2019-07-293-3/+3
| | | | | | | No need to convert these values, they're already of the right type. Signed-off-by: Christian Muehlhaeuser <muesli@gmail.com> (cherry picked from commit a1d8a7ac8bd0e4aff0f27dbb8bb37b8bd13a1346)
* plumbing/format: simplify codeChristian Muehlhaeuser2019-07-292-2/+2
| | | | | | | Just a bit easier to read, in my opinion. Signed-off-by: Christian Muehlhaeuser <muesli@gmail.com> (cherry picked from commit 91d314ce8f13eff06fd4af8b869cee5a3e2ab014)
* plumbing/format: idxfile, unsigned values are never < 0Christian Muehlhaeuser2019-07-291-4/+0
| | | | | Signed-off-by: Christian Muehlhaeuser <muesli@gmail.com> (cherry picked from commit 047bb4f6d0657389ddd4ca3230ff3bee08d66a6b)
* *: added missing error checks in testsChristian Muehlhaeuser2019-07-291-0/+1
| | | | | | | | | | 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)
* *: fixed tautological error conditionsautological error conditionsChristian Muehlhaeuser2019-07-291-8/+6
| | | | | | | | | | - Added missing error handling around encodeCommitData and prevented shadowing err. - Removed tautological error checks. Signed-off-by: Christian Muehlhaeuser <muesli@gmail.com> (cherry picked from commit 7d76176416551fc21d98bc17768d158a82281406)
* 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/packfile, Fix data race and resource leak.Ed Bardsley2019-06-032-11/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Two problems are fixed: - Buffers are not returned to the pool in the case of errors. - Per https://golang.org/pkg/bytes/#Buffer.Bytes, the slice returned from bytes.Buffer.Bytes() is only valid until the next modification of the buffer, so it must be copied before the buffer is returned to the pool. Running `go test -race` detected the following: ``` ================== WARNING: DATA RACE Write at 0x00c000224020 by goroutine 15: bytes.(*Buffer).WriteByte() /usr/local/Cellar/go/1.11.5/libexec/src/bytes/buffer.go:271 +0xc8 vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile.diffDelta() vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/diff_delta.go:95 +0x505 vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile.getDelta() vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/diff_delta.go:60 +0x4ae vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*deltaSelector).tryToDeltify() vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/delta_selector.go:309 +0x398 vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*deltaSelector).walk() vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/delta_selector.go:262 +0x33b vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*deltaSelector).ObjectsToPack.func1() vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/delta_selector.go:70 +0x6a Previous read at 0x00c000224020 by goroutine 8: runtime.slicecopy() /usr/local/Cellar/go/1.11.5/libexec/src/runtime/slice.go:221 +0x0 vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile.getDelta() vendor/gopkg.in/src-d/go-git.v4/plumbing/memory.go:53 +0x5e2 vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*deltaSelector).tryToDeltify() vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/delta_selector.go:309 +0x398 vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*deltaSelector).walk() vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/delta_selector.go:262 +0x33b vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*deltaSelector).ObjectsToPack.func1() vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/delta_selector.go:70 +0x6a Goroutine 15 (running) created at: vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*deltaSelector).ObjectsToPack() vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/delta_selector.go:69 +0x761 vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Encoder).Encode() vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/encoder.go:52 +0xb1 vendor/gopkg.in/src-d/go-git%2ev4.pushHashes.func1() vendor/gopkg.in/src-d/go-git.v4/remote.go:1026 +0x102 Goroutine 8 (finished) created at: vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*deltaSelector).ObjectsToPack() vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/delta_selector.go:69 +0x761 vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Encoder).Encode() vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/encoder.go:52 +0xb1 vendor/gopkg.in/src-d/go-git%2ev4.pushHashes.func1() vendor/gopkg.in/src-d/go-git.v4/remote.go:1026 +0x102 ================== ``` Signed-off-by: Ed Bardsley <ewb@uber.com>
* Remove unnecessary mmap usage from testsFilip Navara2019-05-071-6/+4
| | | | Signed-off-by: Filip Navara <filip.navara@gmail.com>
* Add doc.go for commitgraph packagesFilip Navara2019-05-073-0/+106
| | | | Signed-off-by: Filip Navara <filip.navara@gmail.com>
* Merge pull request #1136 from filipnavara/idxfile-nobufMáximo Cuadros2019-04-271-51/+28
|\ | | | | plumbing: format/idxfile, avoid creating temporary buffers to decode integers
| * plumbing: format/idxfile, avoid looking up the fanout mapping in the ↵Filip Navara2019-04-261-10/+7
| | | | | | | | | | | | iterator twice Signed-off-by: Filip Navara <filip.navara@gmail.com>
| * plumbing: format/idxfile, save another 18% of time in genOffsetHash by not ↵Filip Navara2019-04-251-14/+11
| | | | | | | | | | | | using iterator and not loading CRC Signed-off-by: Filip Navara <filip.navara@gmail.com>
| * plumbing: format/idxfile, avoid creating temporary buffers to decode integersFilip Navara2019-04-251-32/+15
| | | | | | | | Signed-off-by: Filip Navara <filip.navara@gmail.com>
* | plumbing: format/commitgraph, rename structs/fields to follow the terms used ↵Filip Navara2019-04-255-59/+59
| | | | | | | | | | | | by git more closely Signed-off-by: Filip Navara <navara@emclient.com>
* | plumbing: format/commitgraph, clean up error handlingFilip Navara2019-04-253-6/+4
|/ | | | Signed-off-by: Filip Navara <navara@emclient.com>
* Merge pull request #1130 from saracen/gitattributesMáximo Cuadros2019-04-248-0/+1043
|\ | | | | plumbing: format/gitattributes support
| * plumbing: format/gitattributes supportArran Walker2019-04-248-0/+1043
| | | | | | | | | | | | Implements gitattributes parsing, matching and attribute extraction. Signed-off-by: Arran Walker <arran.walker@fiveturns.org>
* | Merge pull request #1128 from filipnavara/commitgraph-fmtMáximo Cuadros2019-04-245-0/+689
|\ \ | | | | | | plumbing: format/commitgraph, add APIs for reading and writing commit-graph files
| * | Remove debug print, fix large edge count calculation to make the reencoded ↵Filip Navara2019-04-242-3/+1
| | | | | | | | | | | | | | | | | | file binary identical Signed-off-by: Filip Navara <filip.navara@gmail.com>
| * | Split OpenFileIndex into smaller functionsFilip Navara2019-04-242-32/+51
| | | | | | | | | | | | Signed-off-by: Filip Navara <filip.navara@gmail.com>
| * | Split Encoder into smaller functionsFilip Navara2019-04-242-55/+95
| | | | | | | | | | | | Signed-off-by: Filip Navara <filip.navara@gmail.com>