Commit Graph

56 Commits

Author SHA1 Message Date
Anirudh H M
1572300806 Initial addition of shell completion script generator 2023-03-14 22:15:03 +05:30
brian m. carlson
f2dec63314
go.mod: bump version to 1.17
One of our dependencies now requires Go 1.17.  Bump the version in
go.mod accordingly.  To please Go, now also run `go mod tidy`, which
separates the indirect dependencies into separate stanzas.
2023-02-21 21:53:32 +00:00
brian m. carlson
53941026d7
Update golang.org/x/text
The version we're using is vulnerable to CVE-2022-32149.  We don't use
the vulnerable code, but upgrade the remaining golang.org/x packages we
depend on, since the text package is merely a dependency of them.  In
doing so, we'll update the text package, and avoid triggering any
warning from vulnerability scanners.

In addition, now that we're using released versions, it will be easier
to keep things up to date.
2023-02-21 20:22:49 +00:00
brian m. carlson
ded743aaa8
go.mod: bump gitobj to v2.1.1
Bump gitobj to a version which addresses a misparsing in commit headers.
2022-09-29 17:57:43 +00:00
brian m. carlson
6544287694
go.mod: require gopkg.in/yaml.v3 v3.0.1
Versions before v3.0.0, including the version from 2020 we're using,
lack the patches in v3.0.1 that fix a security issue.  Update to v3.0.1
to improve the security situation here.
2022-06-01 17:42:20 +00:00
Chris Darroch
c175fdb049 vendor,go.*: update x/crypto and x/text modules
Update the vendored golang.org/x/crypto and golang.org/x/text
modules to the latest versions, which in turn updates the vendored
copy of the golang.org/x/net and golang.org/x/sys modules.

Updating these modules' entries in vendor/modules.txt and go.{mod,sum}
means we will not be flagged by security scanners regarding either
CVE-2021-38561 or CVE-2022-27191, neither of which should actually
affect Git LFS.

The Git LFS client should not be affected by CVE-2021-38561 as it
pertains the Go x/text/language package and specifically the BCP 47
tag functions, which Git LFS does not use.

The Git LFS client should not be affected by CVE-2022-27191 as it
pertains to the Go x/crypto/ssh package and specifically a crash
vulnerability in the SSH server functions, which Git LFS does not use.

The specific commands run to perform this update were:

  go get golang.org/x/crypto@latest &&
  go get golang.org/x/text@latest &&
  go mod tidy && go mod vendor
2022-04-25 17:16:38 -07:00
Chris Darroch
133f29f763 go.*,vendor: bump gitobj to v2.1.0
Bump gitobj to v2.1.0 to fix merges of tree entries where an
existing tree entry has a different file permissions mode than
the tree entry being merged with it.  This should resolve the
problem with import migrations reported in issue #4796 where
existing .gitattributes files with the execute permission mode
set resulted in duplicate .gitattributes tree entries after
import, instead of a single merged entry.

After updating go.mod, the specific commands used for this update
were:
  go mod tidy && go mod vendor

h/t bk2204 for spotting the simplest fix for this
2022-01-24 17:17:08 -08:00
Chris Darroch
82966f13c0 vendor,go.*: update x/crypto and dependencies
Update the vendored golang.org/x/crypto module to the
latest version, which in turn updates the vendored copy
of the x/sys module.

While the portions of x/crypto vendored into this project do
not actually change at all, updating the module's entry in
vendor/modules.txt and go.{mod,sum} means we will not be
flagged by security scanners regarding CVE-2020-29652 in the
x/crypto/ssh library code.

The Git LFS client should not be affected by that security
issue, since we do not use the ssh component of the x/crypto
module.

The specific commands run to perform this update were:

  go get golang.org/x/crypto@latest &&
  go mod tidy && go mod vendor
2021-11-15 15:09:41 -08:00
brian m. carlson
8e7d79e34a
go.mod: add module for gotext
We'd like to support localization in Git LFS.  To do so, add the gotext
package, which implement gettext-compatible localization.
2021-11-10 14:03:53 +00:00
Jen-Hao Liao
ad6b1878de netrc: consider same machine may have different login names 2021-11-04 17:31:37 +08:00
brian m. carlson
087db1de70
Set package version to v3
Since we're about to do a v3.0.0 release, let's bump the version to v3.

Make this change automatically with the following command to avoid any
missed items:

  git grep -l github.com/git-lfs/git-lfs/v2 | \
  xargs sed -i -e 's!github.com/git-lfs/git-lfs/v2!github.com/git-lfs/git-lfs/v3!g'
2021-09-02 20:41:08 +00:00
brian m. carlson
7cc4bce5e4
Bump wildmatch to v2.0.1
Now that we have a fully Git-compatible wildmatch, let's use it in Git
LFS.  Vendor the module appropriately.
2021-08-26 15:48:54 +00:00
Chris Darroch
ada2024b12 go.mod,README.md: add caution about unstable API
Since Git LFS is only intended to be utilized as a compiled
binary and as we do not provide any guarantee of a stable API
or ABI, add notes this effect in go.mod and our main README.
2021-08-15 20:56:40 -07:00
Chris Darroch
dd8e306e31 all: update go.mod module path with explicit v2
When our go.mod file was introduced in commit
114e85c2002091eb415040923d872f8e4a4bc636 in PR #3208, the module
path chosen did not include a trailing /v2 component.  However,
the Go modules specification now advises that module paths must
have a "major version suffix" which matches the release version.

We therefore add a /v2 suffix to our module path and all its
instances in import paths.

See also https://golang.org/ref/mod#major-version-suffixes for
details regarding the Go module system's major version suffix rule.
2021-08-09 23:18:38 -07:00
brian m. carlson
1c309b7f2d
go.mod: bump gitobj to v2.0.2
Bump gitobj to v2.0.2 to fix support for zOS, which has different stat
constants than most other Unices.
2021-07-21 13:41:42 +00:00
brian m. carlson
affd5e9f1c
git: use pktline repository
We have a pktline repository that provides our pkt-line code from Git
LFS, but separated out into a separate, reusable repository.  The
current code is private to the git package, and since we'll want to
use it in the future from multiple packages, it makes sense to just use
the separate repository, which we want to do anyway.

Let's include the repository in our go.mod and vendor the modules.
Remove the old code and replace its use with the new code.
2021-07-20 18:37:31 +00:00
brian m. carlson
d400725442
Bump transitive dependencies
When using Go 1.16 in CI, go get is upgrading some of our dependencies
automatically, and since these items are not in the go.sum file, Go
complains and refuses to build our binary.  Let's bump the relevant
dependencies and vendor the resulting modules to make sure that Go can
build our binary successfully on a fresh Go 1.16.
2021-05-17 17:41:41 +00:00
brian m. carlson
98d237138f
Bump go-spnego to the latest version
This version uses a newer version of the Kerberos library, which should
work better in some environments.  Tidy the go.mod and go.sum files and
vendor the dependencies.
2021-04-14 15:17:33 +00:00
Ondřej Pohořelský
06765e4305 update x/text and dependencies
Update x/text to v0.3.5 that fixes CVE-2020-28852.

The specific commands used for this update:
"go get golang.org/x/text@latest && go mod tidy && go mod vendor"
2021-03-29 11:44:13 +02:00
brian m. carlson
843cd7cb32
go.mod: update golang.org/x/ modules for Go 1.16
We require some newer versions to support Go 1.16, so let's bump the
versions and vendor new copies of the libraries.
2021-03-17 16:54:05 +00:00
Chris Darroch
bbdcbca83a vendor,go.{mod,sum}: update x/net and dependencies
Update the vendored golang.org/x/net module to the latest
version, which in turn updates the vendored copy of the
golang.org/x/text module to 0.3.3.  That version of x/text
includes a mitigation of CVE-2020-14040, which pertains to
processing UTF-16 data with a Byte Order Mark.

The Git LFS client should not be affected by that security
issue, since it does not open streams in UTF-16 mode, but
we update our modules to stay current with the upstream Go
sources and also to avoid being flagged by security scanners.

The specific commands run to perform this update were:
"go get golang.org/x/net@latest && go mod tidy && go mod vendor"
2021-02-08 12:45:26 -08:00
brian m. carlson
af4e04cfe1
Remove dependencies on NTLM
Remove all the pieces that depend on NTLM and remove the NTLM modules.
2021-02-02 16:41:42 +00:00
brian m. carlson
3cd8d8e94a
Bump version of gitobj
There are a variety of miscellaneous fixes in gitobj v2.0.1, so let's
bump the revision in go.mod and go.sum.
2020-12-17 22:50:29 +00:00
Tobias Klauser
ff97759057 tools: use IoctlFileClone from golang.org/x/sys/unix
Use the IoctlFileClone ioctl wrapper provided by golang.org/x/sys/unix
instead of locally implementing it. This also fixes the ioctl on
GOARCHes where the value of FICLONE is different from the currently used
ioctlFiClone value (e.g. mips64/mips64le and ppc64/ppc64le).

This PR also bumps the version of golang.org/x/sys to get
IoctlFileClone and updates its vendored version by running
`go get golang.org/x/sys@latest && go mod tidy && go mod vendor`.
2020-09-23 16:06:45 +02:00
brian m. carlson
9ea4eed5b1
Merge pull request #4251 from stanhu/sh-update-darwin-clonefile
tools/util_darwin.go: Remove use of direct syscalls
2020-09-16 15:46:35 +00:00
Stan Hu
6ed8849319 tools/util_darwin.go: Remove use of direct syscalls
Previously, trying to compile `util_darwin.go` against a recent version
of `golang/sys` library failed with:

```
util_darwin.go:127:3: undefined: unix.SYS_CLONEFILEAT
```

Go v1.12 removed the ability to use direct syscalls. The clonefile
system calls was added to the latest `golang/sys` in
https://github.com/golang/go/issues/41366, so we can use that now.
2020-09-15 22:14:10 -07:00
brian m. carlson
7272af5c8e
go.mod: tidy
Tidy go.mod and go.sum to reflect the latest updates.
2020-07-29 20:53:44 +00:00
brian m. carlson
da4fdef00b
Support SHA-256 repositories
Git will start to support SHA-256 as a hash for repositories in the near
future.  Let's update gitobj to version 2 to support SHA-256
repositories properly.  We initialize the repository based on the
extensions.objectFormat value, if one is provided, since this is the
configuration key that represents the hash algorithm.

Vendor the proper dependencies in place.
2020-07-29 20:53:44 +00:00
Billy Keyes
379e1ba63c Update stretchr/testify to v1.5.1
This adds new assertion methods used in future tests.
2020-04-15 14:10:16 -07:00
brian m. carlson
44623ac530
Tidy modules
Remove some entries which are not needed from go.mod and go.sum.
2020-02-21 14:44:37 +00:00
brian m. carlson
e876f2a869
go.mod: add SPNEGO modules
We'll need some additional dependencies to add support for Kerberos to
Git LFS.  In order to support HTTP SPNEGO (Negotiate) support, add the
required modules and vendor their dependencies.
2019-12-09 15:35:53 +00:00
Marat Radchenko
662a624819 Implement retry logic to fix LFS storage race conditions on Windows
Testing showed that while race condition analysis in #3880 was correct, the way it tries to fix that
does not work for the *first* git-lfs process that will actually perform file move.

Instead, this commit performs multiple attempts when working with files in LFS storage.

Similar logic is already implemented in "cmd/go/internal/robustio" and "cmd/go/internal/renameio" packages.
However, they are not public, so we cannot use them.
2019-11-05 17:30:13 +03:00
Stephen Gelman
72f3f168d2 Use different parser for cookiejar files
The original parser that was used in #3825 brings in a lot of
dependencies that complicate packaging git-lfs.  This replaces it with a
small parser I wrote with almost no dependencies.  I've tested this as
extensively as i can and it seems to work correctly.
2019-10-27 16:48:15 -05:00
Rafal Kupka
aa7ac8f011 Let git-lfs HTTP transport send cookies
This allows Git LFS to use the same cookies as configured for Git
(http.cookieFile). Those cookies may be needed for e.g. Gcloud Identity-Aware
Proxy.
2019-09-28 19:02:20 +01:00
brian m. carlson
479fceb6c1
Update wildmatch to v1.0.4
Update wildmatch to v1.0.4 to fix an issue with matching non-ASCII
patterns.

Note that the version number is v1.0.4 instead of v1.0.3 because the
master branch of wildmatch contains changes which are valuable but not
currently compatible with Git LFS and v1.0.3 was mistakenly tagged from
these changes.  These changes would break semantic versioning, so the
tag was deleted and v1.0.4 was tagged with only compatible changes.

We can adopt these incompatible changes in the future, but it's better
to fix this bug now since it is causing pain for multiple users rather
than wait to address these changes until the new wildmatch can be
included.
2019-09-12 21:47:43 +00:00
brian m. carlson
f65985a1c9
go.mod: update gitobj to v1.4.1
Update gitobj to v1.4.1 and vendor in the new version.
2019-09-11 18:23:57 +00:00
brian m. carlson
9b86505822
go.mod: add go version declaration
This declaration is automatically added by Go 1.13 if it doesn't exist
during any build step.  Since we don't want the file to be modified
during normal use, explicitly declare it as 1.11, since that's the
oldest version we currently support.
2019-09-04 19:59:01 +00:00
brian m. carlson
cd83f4224c
go.mod: clean up for Go 1.13
Go 1.13 has become stricter and now requires that the timestamps in
go.mod reflect the commit timestamps.  Update go.mod and go.sum to make
sure that Go 1.13 is happy.
2019-09-04 14:50:28 +00:00
Lilah Ingvaldsen
b45e832572 Vendor golang.org/x/net dependency
Vendor the `golang.org/x/net` dependency. This will be used in a
future commit to add HTTP/2 transport support.

Note that due to the way go modules work, the `golang.org/x/sys`
dependency was updated as well when running `make vendor`.
2019-08-27 10:24:20 -07:00
brian m. carlson
26c6b6f2e6
go.mod: vendor in gitobj v1.4.0
Vendor in a new version of gitobj so that we can depend on it for
alternates support.
2019-08-15 17:39:32 +00:00
Kazuki MATSUDA / 松田一樹
268625d325
Add clone file (CloneFileByPath) on MacOS X (darwin) 2019-08-01 23:32:29 +09:00
brian m. carlson
65c6bcf7fd
Remove unused pty code
The code which allocated and used a pty on Unix systems was unused, but
it did bring in a dependency on the github.com/kr/pty module. This
module is unmaintained and doesn't compile with gccgo. Since we no
longer need the pty code or this module, remove both of them.
2019-07-26 16:58:21 +00:00
brian m. carlson
feff54aa05
Update gitobj to v1.3.1
Update gitobj to v1.3.1, which fixes a file descriptor leak.
2019-07-17 20:47:17 +00:00
brian m. carlson
094b8c3d41
Vendor in gitobj v1.3.0
This version contains improvements to the pack detection algorithm to
let us work with oddly named packs.
2019-06-13 17:58:06 +00:00
brian m. carlson
fe2fa6746b
Use git-lfs version of go-ntlm
The upstream of go-ntlm has archived its repository and is no longer
doing releases. Because this dependency is required for Git LFS, we've
created our own fork to ensure that the upstream repo doesn't disappear
on us. Use our own copy of go-ntlm within Git LFS.
2019-04-01 19:00:38 +00:00
brian m. carlson
db1ac13289
go.mod: update Cobra to the latest released version
To make the lives of packagers easier, let's update Cobra (and Pflag,
its dependency) to the latest released version.
2019-01-17 21:04:19 +00:00
brian m. carlson
f6eddedfb2
go.mod: add semaphore package
In a future commit, we'll introduce a use of the semaphore package to
prevent goroutines from accidentally running us out of resources. Add
the package to go.mod and go.sum and vendor it in.
2019-01-15 18:53:09 +00:00
brian m. carlson
3e7aeee792
Fix swapped case sensitivity in patterns
Update wildmatch to v1.0.2, which fixes the default case-sensitivity
settings such that Windows and Mac are case insensitive by default and
other Unices are case sensitive by default.
2018-12-17 14:41:28 +00:00
brian m. carlson
31c1edc5d4
go.mod: update wildmatch to v1.0.1
Update wildmatch to v1.0.1 so that we can handle escaped hash marks in
gitattributes files.
2018-12-03 17:18:49 +00:00
brian m. carlson
c825e5ae65
go.mod: update to latest gitobj
Update to the latest gitobj to ensure that we build against a version
that closes all blob files properly.
2018-11-15 19:30:24 +00:00