Commit Graph

16 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
412f582706
git: pass Git environment to object scanner
Currently, we only need the operating system environment to pass to the
object scanner, but when we start processing SHA-256 repositories, we'll
also need to know about the Git configuration as well to determine the
extensions.objectFormat value (which specifies the hash algorithm).
Let's pass the Git environment, as well as the OS environment, down to
our object scanner.
2020-07-29 20:53:43 +00:00
brian m. carlson
228e31fb20
status: update index before showing status
When running `git lfs status`, we perform a `git diff-index`.  However,
we don't update the index first, so any changes, such as permissions
changes due to locking, cause the file to be listed as modified.  Since
these changes don't represent actual changes that we're interested in,
refresh the index before running diff-index so that it doesn't produce
spurious output.
2019-11-18 20:37:52 +00:00
brian m. carlson
9a51ea0f46
Pass environment variables into object scanner
We're going to need the environment variables in the object scanner, so
pass the appropriate Environment instance down into the object scanner.
Use an interface to avoid an import loop between the git and config
packages.

Note that the environment is not yet used, but will be in a future
commit.
2019-08-15 17:39:32 +00:00
Taylor Blau
ca2c3d9ac7 lfs/gitscanner: support gitscanner.Filter in more places 2018-01-31 18:16:28 -08:00
Taylor Blau
da94a63a9d lfs: always use destination sha in diff-index 2017-12-19 16:54:05 -05:00
Taylor Blau
7efde39256 lfs: prefer results from cache before uncached 2017-12-19 16:54:04 -05:00
Taylor Blau
ce358305e6 lfs: don't return *wrappedCmd from NewDiffIndexScanner() 2017-03-15 14:41:50 -06:00
Taylor Blau
c9871c4b93 lfs: introduce DiffIndexScanner 2017-03-14 21:50:38 -06:00
risk danger olson
08c5ae6c64 lfs: teach gitscanner how to emit lockable files that aren't lfs objects 2017-02-16 16:52:40 -07:00
risk danger olson
81d71773a5 lfs: rename git scanner callback type 2017-02-15 16:48:47 -07:00
risk danger olson
52c99650c2 introduce gitscanner callbacks for ScanIndex() 2016-11-29 10:02:21 -07:00
risk danger olson
4c5218c7d3 remove the extra performance tracing, since gitscanner handles it 2016-11-18 11:53:29 -07:00
risk danger olson
422f3ead09 continue gutting lfs/scanner.go 2016-11-18 11:51:15 -07:00
risk danger olson
7275bf2ae4 extract ScanIndex() 2016-11-18 11:48:35 -07:00