aboutsummaryrefslogtreecommitdiffstats
path: root/storage/filesystem/dotgit/dotgit_test.go
Commit message (Collapse)AuthorAgeFilesLines
* storage: filesystem, Add option to set a specific FS for alternatesPaulo Gomes2023-12-021-37/+125
| | | | | | | | | | | Introduces the option to set a FS for alternates, enabling more flexible cross FS sharing of alternates. If none is set, falls back to the current FS used for the object storage. The changes only process a given path once, and if an alternates dir is not valid, exits with error - aligning behaviour with upstream. Signed-off-by: Paulo Gomes <paulo.gomes@suse.com>
* storage: filesystem/dotgit, add support for tmp_objdir prefixSavely Krasovsky2023-07-201-2/+23
|
* *: Remove use of deprecated io/utilPaulo Gomes2023-05-111-4/+3
| | | | Signed-off-by: Paulo Gomes <pjbgf@linux.com>
* dotgit: fix deleted references test in windowsJavi Fontan2023-03-071-2/+3
| | | | Signed-off-by: Javi Fontan <jfontan@gmail.com>
* dotgit: test skip deleted referencesJavi Fontan2023-03-071-0/+67
| | | | | | | Checks that reading references it correctly skips deleted directories and files. Signed-off-by: Javi Fontan <jfontan@gmail.com>
* Merge pull request #418 from abhinav/unusedMáximo Cuadros2021-12-101-1/+1
|\ | | | | Remove unused vars/types/funcs/fields
| * Remove unused variables/types/functionsAbhinav Gupta2021-11-271-1/+1
| | | | | | | | | | | | | | | | [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.
* | storage: filesystem, switch from os.SEEK_* to io.Seek* (#421)Abhinav Gupta2021-12-101-3/+4
|/ | | | | | | The `os.SEEK_*` constants have been deprecated since Go 1.7. It is now recommended to use the equivalent `io.Seek*` constants. Switch `os.SEEK_CUR` to `io.SeekCurrent`, and `os.SEEK_SET` to `io.SeekStart`.
* *: use go-billy instead of os callsMáximo Cuadros2021-05-021-62/+55
|
* Support partial hashes in Repository.ResolveRevision.David Symonds2020-07-161-0/+35
| | | | | | | | | | | | | Like `git rev-parse <prefix>`, this enumerates the hashes of objects with the given prefix and adds them to the list of candidates for resolution. This has an exhaustive slow path, which requires enumerating all objects and filtering each one, but also a couple of fast paths for common cases. There's room for future work to make this faster; TODOs have been left for that. Fixes #135.
* Revert "Merge pull request #20 from quorumcontrol/feature/other-configs"Máximo Cuadros2020-05-241-3/+3
| | | | | This reverts commit 3127ad9a44a2ee935502816065dfe39f494f583d, reversing changes made to 73c52edaad2dae256be61bd1dbbab08e1092f58e.
* storage/filesystem: dotgit, sanity check provided reference pathKyle Evans2020-04-231-1/+1
| | | | | | | | | | On some operating systems, read() of a directory fd may actually succeed and return garbage resembling on-disk contents. As a result, dotgit may return successful from readReferenceFile() when it should in-fact not. This fixes readReferenceFile() on FreeBSD. Signed-off-by: Kyle Evans <kevans@FreeBSD.org>
* storage/filesystem: dotgit, add a test for reading refs from a directoryKyle Evans2020-04-231-1/+13
| | | | | | Specifically, the problem demonstrated is that on some OS (e.g. FreeBSD), read() on a directory will succeed. The current implementation will accept that and return incorrect results, rather than rejecting the directory.
* Fix dotgit testsWes Morgan2020-04-061-3/+3
|
* *: migration from go-git-fixtures/v4 and go-git/gcfgMáximo Cuadros2020-03-101-8/+7
|
* *: migration from gopkg to go modulesMáximo Cuadros2020-03-101-3/+3
|
* Merge pull request #6 from go-git/pr-1153Máximo Cuadros2020-03-101-0/+5
|\ | | | | storage/filesystem: dotgit, unable to work with .git folder with temporal packfiles
| * storage/filesystem: dotgit, Reproduce packfile parse error. Fixes #1149Yuichi Watanabe2019-05-171-0/+5
| | | | | | | | Signed-off-by: Yuichi Watanabe <yuichi.watanabe.ja@gmail.com>
* | *: 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)
* storage/dotgit: test setRef with a non rwfsJavi Fontan2018-12-101-1/+24
| | | | Signed-off-by: Javi Fontan <jfontan@gmail.com>
* storage/filesystem: compare files using offset in testJavi Fontan2018-09-061-2/+13
| | | | | | | | Using equals to compare files it uses diff to do so. This can potentially consume lots of ram. Changed the comparison to use file offsets. If the descriptor is reused the offset is maintained. Signed-off-by: Javi Fontan <jfontan@gmail.com>
* storage/dotgit: add KeepDescriptors optionJavi Fontan2018-09-041-0/+28
| | | | | | | | | | This option maintains packfile file descriptors opened after reading objects from them. It improves performance as it does not have to be opening packfiles each time an object is needed. Also adds Close to EncodedObjectStorer to close all the files manualy. Signed-off-by: Javi Fontan <jfontan@gmail.com>
* storage/dotgit: add ExclusiveAccess tests in dotgitJavi Fontan2018-09-041-0/+24
| | | | | | | | This functionality was already tested in storage/filesystem. The coverage tool only takes into account files from the same package of the test. Signed-off-by: Javi Fontan <jfontan@gmail.com>
* dotgit: fix object delete testSantiago M. Mola2018-08-171-14/+18
| | | | Signed-off-by: Santiago M. Mola <santi@mola.io>
* added hook supportnoxora2018-08-161-1/+48
| | | | | | | | | | | | | | | | Signed-off-by: noxora <ldecker@indeed.com> trying a possible fix to the delete test Signed-off-by: noxora <ldecker@indeed.com> still trying to fix this test Signed-off-by: noxora <ldecker@indeed.com> fixes did not work, seems to be a windows env problem Signed-off-by: noxora <ldecker@indeed.com>
* dotgit: Move package outside internal.Antonio Jesus Navarro Perez2018-06-051-0/+683
Signed-off-by: Antonio Jesus Navarro Perez <antnavper@gmail.com>