Commit Graph

7 Commits

Author SHA1 Message Date
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
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
9e006ac4e2
Rename default branch in tests to "main"
Currently, our default branch in tests is "master".  This is the Git
default, but the Git default will likely change in the future, so it
makes sense to update our testsuite to be explicit about the branch
name.  We'll ensure this continues by building against older versions of
Git as well as newer versions.

We use "main" for the new branch name, since that's the proposed value
upstream.

This commit was made entirely by automated means using the following
command:

  git grep -l master t | xargs sed -i -e 's/master/main/g'
2020-07-08 15:38:17 +00:00
Chris Darroch
6f6b353c25 t: ensure local binary always used in tests
When running our test suite, including the Go tests, we want to ensure
that our locally compiled "git-lfs" binary is the one which is used
whenever "git-lfs" is invoked, for instance as a Git filter command
or as the transfer queue's default custom adapter.  Otherwise we may
see unexpected test failures or successes, if another "git-lfs" binary
installed elsewhere on the system is used instead.

Therefore we define an init() function in the common test utilities
package which prepends to the PATH environment variable an absolute path
to the working tree's "bin/" directory, to ensure our "git-lfs" binary
is always found in preference to any other installed versions.
2020-03-27 17:28:40 -07:00
Kitten King
f5f712b4de
Fix Typos 2019-07-24 07:17:40 +00:00
brian m. carlson
cc815f59e6
Use proper repo permissions when creating directories
Honor the repository permssions set with the umask or
core.sharedRepository when creating directories by using tools.MkdirAll.
Pass an appropriate configuration or filesystem object through as needed
to ensure that we can query the proper permissions. Add a test that
these code paths work by cloning a new repository and then performing
some operations on it.

Note that in the test, we match patterns with either the setgid bit
clear or set, since it may be set or not depending on whether the system
has SysV or BSD group semantics.
2018-12-13 17:51:02 +00:00
Taylor Blau
eb056fb74b t: move testutils.go to cmd sub-package 2018-07-13 12:54:18 -05:00