aboutsummaryrefslogtreecommitdiffstats
path: root/config
Commit message (Collapse)AuthorAgeFilesLines
* *: fix some typosZhizhen He2023-09-081-6/+6
| | | | Signed-off-by: Zhizhen He <hezhizhen.yi@gmail.com>
* *: Remove use of deprecated io/utilPaulo Gomes2023-05-111-2/+1
| | | | Signed-off-by: Paulo Gomes <pjbgf@linux.com>
* feat(clone): add mirror clone optionAyman Bagabas2023-04-171-0/+8
| | | | | | | | | | | | Clone remote as a mirror. This fetches all remote refs, implies bare repository, and sets the appropriate configs. Fixes: https://github.com/go-git/go-git/issues/293 Update options.go Co-authored-by: Paulo Gomes <paulo.gomes.uk@gmail.com> Signed-off-by: Ayman Bagabas <ayman.bagabas@gmail.com>
* config: Add Repository Format ExtensionPaulo Gomes2023-03-081-22/+51
| | | | | | Relates to the SHA256 implementation, defined in #706. Signed-off-by: Paulo Gomes <pjbgf@linux.com>
* minor grammatical fixesJon Eskin2022-09-221-1/+1
|
* all: replace go-homedir with os.UserHomeDirDaniel Martí2022-05-291-2/+1
| | | | Added in Go 1.12, this means we need one less dependency.
* Merge pull request #425 from abhinav/error-stringsMáximo Cuadros2021-12-111-1/+1
|\ | | | | error strings: Don't capitalize, use periods, or newlines
| * error strings: Don't capitalize, use periods, or newlinesAbhinav Gupta2021-12-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-101-0/+1
|\ \ | | | | | | Remove unused vars/types/funcs/fields
| * | Remove unused variables/types/functionsAbhinav Gupta2021-11-271-0/+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.
* | config: describe reason for custom quote functionsmerlin2021-11-081-0/+10
| |
* | config: add tests for branch desc marshaling and unmarshalingmerlin2021-11-081-3/+8
| |
* | config: add support for branch descriptionmerlin2021-11-082-0/+24
|/
* *: use go-billy instead of os callsMáximo Cuadros2021-05-022-14/+9
|
* config: support insteadOf for remotes' URLs (#79)Kostya Ostrovsky2020-12-014-2/+239
|
* add some testsThomas Lazar2020-10-091-0/+27
|
* Add init.defaultBranch to the configThomas Lazar2020-09-302-0/+29
|
* fix goreportcard warningsOleg Kovalov2020-07-011-1/+2
|
* CreateTagOptions.Validate: load Tagger from configMáximo Cuadros2020-06-051-1/+36
|
* config: ReadConfig and LoadConfig from scopesMáximo Cuadros2020-05-242-0/+92
|
* config: Config.[User|Author|Commit] marshal/unmarshalMáximo Cuadros2020-05-242-8/+103
|
* Revert "Merge pull request #20 from quorumcontrol/feature/other-configs"Máximo Cuadros2020-05-242-196/+13
| | | | | This reverts commit 3127ad9a44a2ee935502816065dfe39f494f583d, reversing changes made to 73c52edaad2dae256be61bd1dbbab08e1092f58e.
* config: RefSpec.IsExactSHA1, validates if the refspec describes an exact ↵Máximo Cuadros2020-05-102-3/+22
| | | | SHA1 ref
* Add Merged configWes Morgan2020-04-062-13/+196
| | | | ...for reading and writing global (~/.git/config) and reading system (/etc/gitconfig) configs in addition to local repo config
* *: migration from gopkg to go modulesMáximo Cuadros2020-03-107-9/+9
|
* Merge pull request #1231 from alexandear/fix-typosMáximo Cuadros2019-11-013-8/+8
|\ | | | | *: fix typos in comments, variables and function names
| * Fix typos in comments, variables and function namesOleksandr Redko2019-10-243-8/+8
| | | | | | | | Signed-off-by: Oleksandr Redko <oleksandr.red+github@gmail.com>
* | fix broken link (s/ftp/https/)Jeremiah Mahler2019-10-311-1/+1
|/ | | | Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com>
* *: avoid unnecessary conversionsChristian Muehlhaeuser2019-07-291-1/+1
| | | | | | | 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)
* Merge pull request #1165 from seletskiy/push-pruneMáximo Cuadros2019-07-262-0/+16
|\ | | | | Remote: add Prune option to PushOptions
| * add Prune option to PushOptionsStanislav Seletskiy2019-07-252-0/+16
| | | | | | | | Signed-off-by: Stanislav Seletskiy <s.seletskiy@gmail.com>
* | config: added missing dot.Vladimir Masarik2019-07-041-1/+1
| | | | | | | | Signed-off-by: Vladimir Masarik <masarik.vladimir7@gmail.com>
* | fix wildcard handling in RefSpec matchingMike Lundy2019-06-042-11/+62
|/ | | | | | | | | | | 1) The guard logic here was inverted, resulting in an always-false branch, which meant that the suffix after the wildcard was incorrectly ignored. 2) Wildcards were treated as 1-or-more matches, but git treats them as 0-or-more. This change aligns go-git with git, but represents a bit of a breaking change for go-git. Signed-off-by: Mike Lundy <mike@fluffypenguin.org>
* Support the 'rebase' config key for branchesMike Riley2019-05-173-2/+26
| | | | Signed-off-by: Mike Riley <mikeriley@yelirekim.com>
* config: add a way to see if a "remote" URL is local or notJeremy Stribling2019-02-111-0/+5
| | | | | | | | This factors out some URL-parsing code from the transport layer so it can be used by config as well. Issue: #909 Signed-off-by: Jeremy Stribling <strib@alum.mit.edu>
* Merge pull request #977 from filipnavara/config-testMáximo Cuadros2018-10-091-1/+14
|\ | | | | config: Add test for Windows local paths.
| * Add test for Windows local paths.Filip Navara2018-10-051-1/+14
| | | | | | | | Signed-off-by: Filip Navara <navara@emclient.com>
* | all: remove extra 's' in "mismatch"Jongmin Kim2018-09-261-1/+1
|/ | | | Signed-off-by: Jongmin Kim <jmkim@pukyong.ac.kr>
* config: add commentChar to core config structZaq? Wiedmann2018-08-292-0/+7
| | | | Signed-off-by: Zaq? Wiedmann <zaquestion@gmail.com>
* config: modules, Ignore submodules with dotdot '..' path components. Fixes ↵Joseph Vusich2018-05-303-12/+46
| | | | | | | | | | | CVE-2018-11235 References: * https://blogs.msdn.microsoft.com/devops/2018/05/29/announcing-the-may-2018-git-security-vulnerability/ * https://security-tracker.debian.org/tracker/CVE-2018-11235 * https://github.com/git/git/commit/0383bbb9015898cbc79abd7b64316484d7713b44 Signed-off-by: Joseph Vusich <jvusich@amazon.com>
* config: adds branches to config for tracking branches against remotes, ↵Jeremy Chambers2018-04-104-5/+284
| | | | | | updates clone to track when cloning a branch. Fixes #313 Signed-off-by: Jeremy Chambers <jeremy@thehipbot.com>
* Add more unit tests for RefSpecAlan Cabrera2018-03-141-0/+13
| | | | | | Need this to get better code coverage of the bug fix. Signed-off-by: Alan Cabrera <adc@toolazydogs.com>
* Fix RefSpec.Src()Alan Cabrera2018-03-142-1/+13
| | | | | | | | | Previously, the Src() function was assuming there are no “+” characters in the refspec src and erroneously used the strings.Index() function to compute the start index of src in the refspec. This change now uses the IsForceUpdate() method to decide how to elide the force update token. Signed-off-by: Alan Cabrera <adc@toolazydogs.com>
* Make DefaultPackWindow const public and document itJavi Fontan2018-01-102-5/+7
| | | | Signed-off-by: Javi Fontan <jfontan@gmail.com>
* Add tests for default config valuesJavi Fontan2018-01-101-0/+9
| | | | Signed-off-by: Javi Fontan <jfontan@gmail.com>
* Set default pack window size in configJavi Fontan2018-01-091-1/+5
| | | | | | | | Config is not initialized with the default window size. Without this the window size is 0 by default and packfile code is unable to generate deltas. Signed-off-by: Javi Fontan <jfontan@gmail.com>
* all: simplificationferhat elmas2017-11-293-20/+7
| | | | | | | | | | - 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`
* config: support a configurable, and turn-off-able, pack.windowJeremy Stribling2017-09-112-0/+47
| | | | | | | | | | | | | | | | | | | | One use of go-git is to transfer git data from a non-standard git repo (not stored in a file system, for example) to a "remote" backed by a standard, local .git repo. In this scenario, delta compression is not needed to reduce transfer time over the "network", because there is no network. The underlying storage layer has already taken care of the data tranfer, and sending the objects to local .git storage doesn't require compression. So this PR gives the user the option to turn off compression when it isn't needed. Of course, this results in a larger, uncompressed local .git repo, but the user can then run git gc or git repack on that repo if they care about the storage costs. Turning the pack window to 0 on reduces total push time of a 36K repo by 50 seconds (out of a pre-PR total of 3m26s).
* serialized remotes in alphabetical orderManuel Carmona2017-08-102-4/+12
|
* config: preserve option order on config marshallingSantiago M. Mola2017-08-012-12/+28
| | | | | Do not change order of options (e.g. in RemoteConfig) when serializing for any option whose value has not changed.