aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* config: support insteadOf for remotes' URLs (#79)Kostya Ostrovsky2020-12-014-2/+239
|
* Merge pull request #178 from tomlazar/defaultbranchMáximo Cuadros2020-10-302-0/+56
|\ | | | | config: add init.defaultBranch to the config
| * add some testsThomas Lazar2020-10-091-0/+27
| |
| * Add init.defaultBranch to the configThomas Lazar2020-09-302-0/+29
| |
* | Merge pull request #195 from adracus/fix.relative-submodulesMáximo Cuadros2020-10-303-27/+42
|\ \ | | | | | | Fix relative submodule resolution
| * | Fix relative submodule resolutionAxel Christ2020-10-283-27/+42
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the current behavior, the config will always hold the resolved, absolute URL, leavin the user of go-git no choice to determine whether the original URL is relative or not. This changes to employ relative URL resolution only when resolving a submodule to a repository to keep the correct configuration 'unresolved' and intact. Change relative resolution using `filepath.Dir` to `path.Join` while parsing both the 'root' and the relative URL with `net/url.URL`. Adapt test to verify the new behavior. Re-fixes #184 (see comments).
* | Merge pull request #184 from mikyk10/masterMáximo Cuadros2020-10-202-2/+70
|\ \ | | | | | | git: worktree, Support relative submodule URL.
| * | git: worktree, Support relative submodule URL.Mitsutaka Naito2020-10-132-2/+70
|/ /
* | Merge pull request #162 from yabberyabber/fetch-errorv5.2.0Máximo Cuadros2020-10-092-1/+16
|\ \ | | | | | | Fetch should return a unique error type when ref not found
| * | Fetch should return a unique error type when ref not foundandrew2nelson2020-09-022-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | It can be useful for callers to distinguish between an error of "couldn't find remote ref" and some other error like "network error". Creating an explicit error type for this allows consumers to determine the kind of error using the errors.Is and errors.As interface added in go1.13
* | | 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 #161 from ashokponkumar/masterMáximo Cuadros2020-09-042-0/+22
|\ \ \ | |_|/ |/| | PlainOpenWithOptions: support file path
| * | support file path in PlainOpenWithOptions - do only when detect flag is enabledAshok Pon Kumar2020-09-022-2/+6
| | |
| * | support file path in PlainOpenWithOptionsAshok Pon Kumar2020-09-022-0/+18
|/ /
* | Merge pull request #158 from chrisgavin/fix-force-push-delete-referenceMáximo Cuadros2020-08-312-1/+26
|\ \ | | | | | | git: remote, Fix deleting references when force pushing.
| * | git: remote, Fix deleting references when force pushing.Chris Gavin2020-08-282-1/+26
|/ /
* | Merge pull request #146 from fatelei/clone_with_sshMáximo Cuadros2020-08-242-0/+53
|\ \ | | | | | | chore: add an exmaple: clone with ssh
| * | chore: add an exmaple: clone with sshfatelei2020-08-222-0/+53
|/ /
* | Merge pull request #139 from StupidScience/113-git-commit-all-fixMáximo Cuadros2020-07-211-2/+8
|\ \ | | | | | | Worktree.Commit: speed up commit with all: true option
| * | speed up commit with all: true optionAnton Kaymakchi2020-07-211-2/+8
|/ /
* | Merge pull request #125 from cristaloleg/minor-linter-fixesMáximo Cuadros2020-07-169-24/+18
|\ \ | | | | | | *: minor linter fixes
| * | revert time.Unix typecastOleg Kovalov2020-07-141-1/+1
| | |
| * | fix slice capacityOleg Kovalov2020-07-071-1/+1
| | |
| * | Minor linter fixesOleg Kovalov2020-07-0610-25/+19
| | |
* | | Merge pull request #136 from dsymonds/revparse-partial-hashMáximo Cuadros2020-07-168-10/+234
|\ \ \ | | | | | | | | Repository.ResolveRevision, support partial hashes
| * | | Support partial hashes in Repository.ResolveRevision.David Symonds2020-07-168-10/+234
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | 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
| | |/ | |/|
* | | Merge pull request #128 from cristaloleg/minor-perf-fixesMáximo Cuadros2020-07-142-2/+2
|\ \ \ | | | | | | | | Use EqualFold for comparison
| * | | Use EqualFold for comparisonOleg Kovalov2020-07-062-2/+2
| | |/ | |/|
* | | Merge pull request #123 from cristaloleg/check-err-fixMáximo Cuadros2020-07-102-6/+8
|\ \ \ | | | | | | | | *: skip error check explicitly
| * | | Skip error check explicitlyOleg Kovalov2020-07-062-6/+8
| |/ /
* | | Merge pull request #121 from riking/cache-seekMáximo Cuadros2020-07-102-3/+42
|\ \ \ | | | | | | | | plumbing: memoryobject, make blob reader seekable
| * | | memoryobject: make blob reader seekableKane York2020-07-062-3/+42
| | | | | | | | | | | | | | | | Replace the bytes.Buffer with a bytes.Reader wrapped in a custom NopCloser, so that the extra reading methods are sill accessible.
* | | | Merge pull request #124 from cristaloleg/use-one-name-for-receiverMáximo Cuadros2020-07-108-54/+54
|\ \ \ \ | | | | | | | | | | *: use only one name for receiver
| * | | | Use only one name for receiverOleg Kovalov2020-07-068-54/+54
| | |/ / | |/| |
* | | | Merge pull request #127 from cristaloleg/dont-skip-errorMáximo Cuadros2020-07-101-2/+1
|\ \ \ \ | |/ / / |/| | | Dont skip error
| * | | Dont skip errorOleg Kovalov2020-07-061-2/+1
|/ / /
* | | Merge pull request #117 from cristaloleg/fix-goreportcardMáximo Cuadros2020-07-0654-75/+93
|\ \ \ | |_|/ |/| | fix goreportcard warnings
| * | fix nilOleg Kovalov2020-07-017-9/+11
| | |
| * | fix goreportcard warningsOleg Kovalov2020-07-0148-67/+83
|/ /
* | Merge pull request #109 from mruediger/masterMáximo Cuadros2020-06-242-1/+27
|\ \ | | | | | | Worktre: Pull, report "Already up to date" when local repository ahead of remote
| * | Report "Already up to date" when local repository ahead of remoteMathias Rüdiger2020-06-222-1/+27
|/ / | | | | | | | | | | | | If you run 'git pull', do a commit and run 'git pull' again git will report "Already up to date" whereas go-git would report a reports non-fast-forward update. This commit changes the behavior of go-git to match that of git.
* | Merge pull request #88 from distorhead/cherryPickCommonDirSupportMáximo Cuadros2020-06-168-2/+370
|\ \ | | | | | | storage: filesystem, support .git/commondir repository layout
| * | Support `.git/commondir` repository layoutTimofey Kirillov2020-06-158-2/+370
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Git creates `.git/commondir` when there are custom worktrees (see "git worktree add" related commands). `.git/commondir` in such case contains a link to another dot-git repository tree, which could contain some folders like: - objects; - config; - refs; - etc. In this PR a new dotgit.RepositoryFilesystem struct is defined, which is billy.Filesystem interface compatible object-wrapper, that can handle commondir and dispatch all operations to the correct file path. `git.PlainOpen` remain unchanged, but `git.PlainOpenWithOptions` has a new option: `PlainOpenOptions.EnableDotGitCommonDir=true|false` (which is false by default). When `EnableDotGitCommonDir=true` repository-open procedure will read `.git/commondir` (if it exists) and then create dotgit.RepositoryFilesystem object initialized with 2 filesystems. This object then passed into storage and then into dotgit.DotGit as `billy.Filesystem` interface. This object will catch all filesystem operations and dispatch to the correct repository-filesystem (dot-git or common-dot-git) according to the rules described in the doc: https://git-scm.com/docs/gitrepository-layout#Documentation/gitrepository-layout.txt. EnableDotGitCommonDir option will only work with the filesystem-backed storage. Also worktree_test.go has been adopted from an older, already existing existing PR: https://github.com/src-d/go-git/pull/1098. This PR needs new fixtures added in the following PR: https://github.com/go-git/go-git-fixtures/pull/1.
* | _examples: tag-create-push, remove defaultSignatureMáximo Cuadros2020-06-141-16/+3
| |