| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |
|
|\ \
| | |
| | | |
Fix relative submodule resolution
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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).
|
|\ \
| | |
| | | |
git: worktree, Support relative submodule URL.
|
|/ / |
|
|\ \
| | |
| | | |
Fetch should return a unique error type when ref not found
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
|\ \ \
| |_|/
|/| | |
config: add missing functions for completeness
|
| | | |
|
| | | |
|
|\ \ \
| |_|/
|/| | |
PlainOpenWithOptions: support file path
|
| | | |
|
|/ / |
|
|\ \
| | |
| | | |
git: remote, Fix deleting references when force pushing.
|
|/ / |
|
|\ \
| | |
| | | |
chore: add an exmaple: clone with ssh
|
|/ / |
|
|\ \
| | |
| | | |
Worktree.Commit: speed up commit with all: true option
|
|/ / |
|
|\ \
| | |
| | | |
*: minor linter fixes
|
| | | |
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
Repository.ResolveRevision, support partial hashes
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
|\ \ \
| | | |
| | | | |
.gitignore crlf fix
|
| | | | |
|
| | | | |
|
| | |/
| |/| |
|
|\ \ \
| | | |
| | | | |
Use EqualFold for comparison
|
| | |/
| |/| |
|
|\ \ \
| | | |
| | | | |
*: skip error check explicitly
|
| |/ / |
|
|\ \ \
| | | |
| | | | |
plumbing: memoryobject, make blob reader seekable
|
| | | |
| | | |
| | | |
| | | | |
Replace the bytes.Buffer with a bytes.Reader wrapped in a custom NopCloser, so that the extra reading methods are sill accessible.
|
|\ \ \ \
| | | | |
| | | | | |
*: use only one name for receiver
|
| | |/ /
| |/| | |
|
|\ \ \ \
| |/ / /
|/| | | |
Dont skip error
|
|/ / / |
|
|\ \ \
| |_|/
|/| | |
fix goreportcard warnings
|
| | | |
|
|/ / |
|
|\ \
| | |
| | | |
Worktre: Pull, report "Already up to date" when local repository ahead of remote
|
|/ /
| |
| |
| |
| |
| |
| | |
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.
|
|\ \
| | |
| | | |
storage: filesystem, support .git/commondir repository layout
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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, Add create and push new tag
|
| | | |
|