| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
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: Zhizhen He <hezhizhen.yi@gmail.com>
|
|
|
|
| |
Signed-off-by: Paulo Gomes <pjbgf@linux.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
| |
Added in Go 1.12, this means we need one less dependency.
|
|\
| |
| | |
error strings: Don't capitalize, use periods, or newlines
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|\ \
| | |
| | | |
Remove unused vars/types/funcs/fields
|
| |/
| |
| |
| |
| |
| |
| |
| | |
[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.
|
| | |
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This reverts commit 3127ad9a44a2ee935502816065dfe39f494f583d, reversing
changes made to 73c52edaad2dae256be61bd1dbbab08e1092f58e.
|
|
|
|
| |
SHA1 ref
|
|
|
|
| |
...for reading and writing global (~/.git/config) and reading system (/etc/gitconfig) configs in addition to local repo config
|
| |
|
|\
| |
| | |
*: fix typos in comments, variables and function names
|
| |
| |
| |
| | |
Signed-off-by: Oleksandr Redko <oleksandr.red+github@gmail.com>
|
|/
|
|
| |
Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com>
|
|
|
|
|
|
|
| |
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)
|
|\
| |
| | |
Remote: add Prune option to PushOptions
|
| |
| |
| |
| | |
Signed-off-by: Stanislav Seletskiy <s.seletskiy@gmail.com>
|
| |
| |
| |
| | |
Signed-off-by: Vladimir Masarik <masarik.vladimir7@gmail.com>
|
|/
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Mike Riley <mikeriley@yelirekim.com>
|
|
|
|
|
|
|
|
| |
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>
|
|\
| |
| | |
config: Add test for Windows local paths.
|
| |
| |
| |
| | |
Signed-off-by: Filip Navara <navara@emclient.com>
|
|/
|
|
| |
Signed-off-by: Jongmin Kim <jmkim@pukyong.ac.kr>
|
|
|
|
| |
Signed-off-by: Zaq? Wiedmann <zaquestion@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
updates clone to track when cloning a branch. Fixes #313
Signed-off-by: Jeremy Chambers <jeremy@thehipbot.com>
|
|
|
|
|
|
| |
Need this to get better code coverage of the bug fix.
Signed-off-by: Alan Cabrera <adc@toolazydogs.com>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
|
|
|
| |
Signed-off-by: Javi Fontan <jfontan@gmail.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
- 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`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
| |
|