| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
git: add a clone option to allow for shallow cloning of submodules
|
| |
| |
| |
| |
| | |
This option matches the git clone option --shallow-submodules.
https://git-scm.com/docs/git-clone#Documentation/git-clone.txt---no-shallow-submodules
|
|/
|
|
|
|
|
| |
The previous hard-coded 10 second value is too short for listing large
repositories like https://gitlab.com/gitlab-org/gitlab
Return an error on nonsensical subzero timeout values
|
|\
| |
| | |
git: Add Depth to SubmoduleUpdateOptions
|
| | |
|
| |
| |
| |
| | |
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
A new PeelingOption field was introduced into ListOptions. The new options
include the default (and backwards compatible) IgnorePeeled. Plus another
two variations which either only returns peeled references (OnlyPeeled), or
append peeled references to the list (AppendPeeled).
The ls-remote example was updated to align with upstream, in which peeled
references are appended to the results by default.
A new ErrEmptyUrls error is now returned when List or ListContext do not
receive a URL to work with, to improve overall execution flow.
Signed-off-by: Paulo Gomes <pjbgf@linux.com>
|
|\ \
| | |
| | | |
fix: git grep bare repositories
|
| |/
| |
| |
| |
| |
| | |
Perform grep on `*Repository` instead of `*Worktree`.
Fixes: https://github.com/go-git/go-git/issues/68
|
|/
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Relates to the SHA256 implementation, defined in #706.
Signed-off-by: Paulo Gomes <pjbgf@linux.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BuildTree now returns an ErrEmptyCommit error, when there are no
changes to be committed. This can be opted-out via
CommitOptions.AllowEmptyCommits.
This is a breaking change which enables applications to detect when
empty commits are to be created.
Some instances in which this can occur is when the fs (e.g. `billy/osfs`)
make changes to the underlying files, causing a conflict between what
the previous Git worktree state was, and the current state. Changes to
the fs implementations are orthogonal to this, and will be dealt with
separately.
The new behaviour aligns with the Git CLI, in which empty commits
returns the error message: 'nothing to commit, working tree clean'.
Signed-off-by: Paulo Gomes <pjbgf@linux.com>
|
| |
|
|
|
|
|
| |
Signed-off-by: cui fliter <imcusg@gmail.com>
Signed-off-by: cui fliter <imcusg@gmail.com>
|
|\ |
|
| |\
| | |
| | | |
Worktree: Checkout, simplified sparse checkout
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is the initial logic to support a simple sparse checkout where
directories to be included can be specified in CheckoutOptions.
This change doesn't fully support the sparse patterns, nor does this
change include the optimization to collapse flie entries in ithe index
that are excluded via the sparse checkout directory patterns included
under the parent directory.
|
| |/
| |
| |
| |
| |
| |
| |
| | |
--force-with-lease allows a push to force push with some safety
measures. If the ref on the remote is what we expect, then the force
push is allowed to happen.
See https://git-scm.com/docs/git-push#Documentation/git-push.txt---force-with-leaseltrefnamegt
for more information
|
|/
|
|
|
|
| |
push --atomic allows a push to succeed or fail atomically. If one ref
fails, the whole push fails. This commit allows the user to set Atomic
as an option for a push.
|
|\
| |
| | |
Remote: PushOptions add push-options
|
| |
| |
| |
| | |
go-git: Add field `Options` to `PushOptions`, wire functionality.
|
|/
|
|
|
|
|
|
|
|
| |
Taken from `git help push` and adapted to match the supported features
only.
Future iterations of this feature may include better support for git
"SHA-1 expression", documented in `git help push` as:
> any arbitrary "SHA-1 expression", such as master~4 or HEAD (see gitrevisions(7)).
|
|\
| |
| | |
Remote: add RemoteURL to {Fetch,Pull,Push}Options
|
| |
| |
| |
| |
| | |
Can be used to override the URL to operate on:
RemoteName will be ignored for the actual fetch
|
|/
|
|
| |
This PR adds support for the --follow-tags option for pushes.
|
| |
|
|
|
|
| |
github.com/ProtonMail/go-crypto/openpgp (#283)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The git protocol itself uses a compare-and-swap mechanism, where changes
send the old and new values and the change is only applied if the old
value matches. This is used to implement the --force-with-lease feature
in git push.
go-git populates the `old` field with the current value of the ref that
is read from the remote. We can implement a convenient (albeit more
limited) form of the --force-with-lease feature just by allowing the
caller to specify particular values for this ref.
Callers can then implement complex multi-step atomic operations by
reading the ref themselves at the start of the process, and passing to
in RequireRemoteRefs at the end. This is also a suitable building block
for implementing --force-with-lease (#101), which is mostly an exercise
in computing the correct hash to require. Hence, this appears to be the
most reasonable API to expose.
|
|
|
|
|
| |
This PR add insecureSkipTLSVerify and cabundle to any remote http calls
so that https repo with private CA signed can be used. This is the
equivalent of https.sslVerify and GIT_SSL_CAINFO
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|\ |
|
| | |
|
|/ |
|
| |
|
|
|
|
| |
Signed-off-by: Saeed Rasooli <saeed.gnu@gmail.com>
|
|
|
|
| |
Signed-off-by: knqyf263 <knqyf263@gmail.com>
|
|
|
|
| |
Signed-off-by: Stanislav Seletskiy <s.seletskiy@gmail.com>
|
|
|
|
| |
Signed-off-by: Linuxer Wang <linuxerwang@gmail.com>
|
|\
| |
| | |
git: Fix typo
|
| |
| |
| | |
Signed-off-by: Jeremy Schlatter <jeremy.schlatter@gmail.com>
|
|/
|
| |
Signed-off-by: Jeremy Schlatter <jeremy.schlatter@gmail.com>
|
|
|
|
| |
Signed-off-by: kuba-- <kuba@sourced.tech>
|
|
|
|
| |
Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
|
|
|
| |
plumbing: object, Add support for Log with filenames. Fixes #826
|
|
|
|
|
|
|
| |
Just renaming the TagObjectOptions type to CreateTagOptions so that it's
consistent with the other option types.
Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>
|
|
|
|
|
|
|
|
|
|
| |
I figured there was a way to do this without having to have
TagObjectOptions supply this in - there is.
Added support for this in and removed the object type from
TagObjectOptions.
Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>
|
|
|
|
|
|
|
|
|
|
| |
Tag messages are highly sensitive to being in the expected format,
especially when encoding/decoding for PGP verification.
As such, we do a simple trimming of whitespace on the incoming message
and add a newline on the end, to ensure there are no surprises here.
Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>
|