| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
I didn't dig into the specific case that was triggering this, but we did have a panic in our production system.
|
|
|
|
|
|
|
| |
Allow checking out a worktree using a tag hash id.
Fixes: https://github.com/go-git/go-git/issues/959
Supersedes: https://github.com/go-git/go-git/pull/964
|
|
|
|
|
|
|
|
| |
Some worktree validation rules observed upstream are not checked
by go-git, leading to scenarios in which what seems to be a valid
repository for go-git is not necessarily the case for the git cli.
Signed-off-by: Paulo Gomes <paulo.gomes@suse.com>
|
|\
| |
| | |
git: stop iterating at oldest shallow when pulling. Fixes #305
|
| | |
|
|/
|
|
|
|
|
|
|
|
| |
Check reference names format before creating branches/tags/remotes.
This should probably be in a lower level somewhere in `plumbing`.
Validating the names under `plumbing.NewReference*` is not possible
since these functions don't return errors.
Fixes: https://github.com/go-git/go-git/issues/929
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: Paulo Gomes <pjbgf@linux.com>
|
|
|
|
|
|
| |
Perform grep on `*Repository` instead of `*Worktree`.
Fixes: https://github.com/go-git/go-git/issues/68
|
|
|
|
|
|
|
|
|
|
| |
When we delete dir1/dir2/file1, we currently check if dir2 becomes
empty with the deletion of file1, and if so, we delete dir2. If
dir1 becomes empty with the deletion of dir2, we don't notice that,
and dir1 is left behind.
This commit adds a loop to check each parent directory in the file
path for emptiness, removing empty directories along the way until
a non-empty directory is found (or an error occurs).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Expands on the optimisations from https://github.com/fluxcd/go-git/pull/5
and ensures that zlib reader does not need to recreate a deflate
dictionary at every use.
The use of sync pools was consolidated into a new sync utils package.
name old time/op new time/op delta
Parser-16 7.51ms ± 3% 7.71ms ± 6% ~ (p=0.222 n=5+5)
name old alloc/op new alloc/op delta
Parser-16 4.65MB ± 3% 1.90MB ± 3% -59.06% (p=0.008 n=5+5)
name old allocs/op new allocs/op delta
Parser-16 3.48k ± 0% 3.32k ± 0% -4.57% (p=0.016 n=5+4)
Signed-off-by: Paulo Gomes <pjbgf@linux.com>
|
|
|
|
| |
Signed-off-by: Paulo Gomes <pjbgf@linux.com>
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Can be used to override the URL to operate on:
RemoteName will be ignored for the actual fetch
|
| |
|
|
|
|
|
|
|
| |
When using a separate worktree directory while working on a bare
repository, cleaning with CleanOptions{Dir: true} would also remove the
root worktree directory if empty.
Signed-off-by: Michael Hanselmann <public@hansmi.ch>
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: Mohammad Kefah <mo@edraj.io>
|
|
|
|
| |
Signed-off-by: Linuxer Wang <linuxerwang@gmail.com>
|
|
|
|
| |
Signed-off-by: Tobias Meinhardt <tobias.meinhardt89@gmail.com>
|
|
|
|
| |
Signed-off-by: Alexey Smirnov <unlinkat@gmail.com>
|
|
|
|
| |
Signed-off-by: kuba-- <kuba@sourced.tech>
|
|
|
|
| |
Signed-off-by: kuba-- <kuba@sourced.tech>
|
|
|
|
|
|
|
|
|
| |
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/10ecfa76491e4923988337b2e2243b05376b40de
Signed-off-by: Joseph Vusich <jvusich@amazon.com>
|
|
|
| |
Worktree: Provide ability to add excludes
|
|
|
|
|
|
| |
missing
This implementation mimicks the behavior of Git on Windows
Signed-off-by: Felix Kollmann <mail@fkollmann.de>
|
|
|
|
| |
Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
|
|
|
|
| |
Signed-off-by: Sunny <me@darkowlzz.space>
|
|
|
| |
This change implemented grep on worktree with options to invert match and specify pathspec. Also, a commit hash or reference can be used to specify the worktree to search.
|
|
|
|
|
|
|
| |
This change implement git clean with a `Dir` option. By default, clean
removes only the untracked files in the working directory. If `Dir`
option is set to true, untracked files under other directories are also
cleaned.
|
| |
|
|
|
|
| |
Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
|
| |
|
| |
|
|\
| |
| | |
plumbing: moved `Reference.Is*` methods to `ReferenceName.Is*`
|
| | |
|
|/ |
|
|\
| |
| | |
worktree: expose underlying filesystem
|
| | |
|
|/ |
|
| |
|
| |
|
|\
| |
| | |
*: several windows support fixes
|