Commit Graph

43 Commits

Author SHA1 Message Date
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
7ffe2bde4a
go.sum: tidy
Run "go mod tidy" to remove older entries from go.sum.
2019-09-11 18:23:56 +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
brian m. carlson
79074dca68
go.sum: remove old versions of cobra and pflag
Since we're now using newer versions, remove the old versions to keep
data tidy.
2019-08-15 17:39:32 +00: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
Steffen Godskesen
03aa2efced tasklog: don't log progress status when stdout is not a tty
But make it overridable by either
 - setting lfs.forceprogress 1
 - setting GIT_LFS_FORCE_PROGRESS=1
2018-11-14 14:35:29 -08:00
brian m. carlson
229d70b4ef
go.sum: add missing entries
Each module in go.sum should have two entries, one for the module itself
and one for the go.mod file.  Ensure both of these are included.
2018-10-16 18:58:20 +00:00
Taylor Blau
d68e51474e go.mod: depend on git-lfs/gitobj@v1.0.0
Since we have started tagging git-lfs/gitobj to be semantically
versioned, let's depend on that tag instead of the latest SHA-1 from
HEAD.

v1.0.0 is identical to the existing hash (1e97572956c1), so there are no
changes in vendor/, other than the pinned book-keeping.
2018-10-11 10:08:07 -07:00
Taylor Blau
b1f104e109 go.sum: clean up older versions
For versions that we do not depend on, let's remove them from the go.sum
file by removing it and re-creating it here:

  $ rm go.sum
  $ make go.sum
2018-10-11 10:08:01 -07:00
brian m. carlson
902e855f32 go.mod: update gitobj to the latest master
In a future commit, we'll use the latest gitobj's untyped Object
function and storage functionality.  Update the repository to the latest
master and vendor the dependencies.
2018-09-11 17:43:19 +00:00
Taylor Blau
d32ff9b429 go.mod: use latest github.com/olekukonko/ts
We use package github.com/olekukonko/ts to issue IOCTL's to gather the
terminal size of the calling terminal in order to determine the length
of lines we attempt to print.

Until now, we have used revision ecf753e7c962, which is over 4 years
old. Since then, github.com/olekukonko/ts has introduced support for
Solaris, which we previously could not build or run on because package
syscall on Solaris does not export an IOCTL constant.

Let's upgrade to the latest version, and bring in support for Solaris.
2018-09-03 09:27:17 -04:00
Taylor Blau
8f0c44cde1 go.mod: pin github.com/git-lfs/wildmatch to v1.0.0
In order to prefer semantically versioned tags of our dependent
repositories over Go's date & SHA-1 format, let's tag
github.com/git-lfs/wildmatch.git at v1.0.0 (on the latest master) and
vendor it as such here.

The only change between b31c34466d64 and v1.0.0 is:

  * 83d2acb (Merge pull request #9 from git-lfs/ttaylorr/go-1.11,
    2018-08-31)
  * 2f71dd1 (.travis.yml: build on Go 1.11, 2018-08-30)
  * 4bab7d7 (go.mod: initial commit, 2018-08-30)

Which is the introduction of the go.mod file (and related changes).
Thus, there are no code changes between the two, so this is a safe
change to make.
2018-08-31 12:44:13 -04:00
Taylor Blau
114e85c200 all: use Go Modules instead of Glide
Since we are now building on Go 1.11 (as of 074a2d4f (all: use Go 1.11
in CI, 2018-08-28)) and Go 1.11 supports Go Modules [1], let's stop
using Glide, and begin using Go Modules.

This involves a few things:

  * Teach the Makefile how to build go.sum files instead of glide.lock
    files.

  * Teach continuous integration services to build Git LFS in a
    non-$GOPATH environment, since (without setting GO111MODULE=on
    explicitly, which we choose not to do), this will break compiling
    Git LFS, because Go 1.11 will ignore modules present in a Go
    checkout beneath $GOPATH.

  * In order to do the above, let's also make sure that we are
    un-setting $GOCACHE in the environment, as this causes Go to work
    without modules support [2].

  * Because we're no longer building in a `$GOPATH`-based location,
    let's instruct the CircleCI base image to archive the new location,
    too.

  * Similarly, teach the RPM spec to build in a non-$GOPATH location.

  * By contrast, since we use dh_golang to build git-lfs binaries on
    Debian, let's wait until the upstream dh_golang package is released
    with support for Go 1.11 module support explicitly. Therefore, force
    GO111MODULE to be on so that we can build a copy of Git LFS whose
    checkout is within a $GOPATH.

Although the go.mod versions match the glide.yaml ones, the diff
attached is large because Go Modules do not vendor `_test.go` files,
whereas Glide does.

[1]: https://golang.org/doc/go1.11#modules
[2]: `GOCACHE=on` will be deprecated in Go 1.12, so this change makes
     sense for that reason, too.

Co-authored-by: brian m. carlson <bk2204@github.com>
2018-08-29 13:25:47 -04:00