Commit Graph

17 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
brian m. carlson
22a7fbdb4a
filepathfilter: switch to strict pattern matching
There are two types of pattern matching with wildmatch patterns in Git:
gitignore and gitattributes patterns.  We'd like to support both, but
without the lazy matching that was the cause of so many problems before.

Add a type of pattern to use when creating a new filepathfilter and use
it to instantiate the wildmatch pattern with the proper flags.  Remove
the dirs flag, which is unused and has been for sometime, and also the
stripping of trailing slashes, which we want to use to indicate a
directory.  Drop the non-strict mode since our pattern matching is now
much improved and compatible with Git.
2021-08-26 15:48:54 +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
1e41bbffbb
git: move LsTreeScanner to the git package
We're going to need to scan trees with ls-tree in the git package in the
future, and we can't call into the lfs package because of import loops,
so let's move the scanner to the git package.

While we're at it, let's make two important changes.  First, let's
remove the blob size check, since we're going to want this functionality
in order to read all blobs, not just small ones.  As part of that, move
that check into the place where we use the output of the scanner so we
don't lose this check.

The other check is to change the name Sha1 to Oid, since we now support
SHA-256 repos as well as SHA-1 repos.

Move the tests and some of the helper functions to the new package as
well.
2021-07-14 18:12:07 +00:00
risk danger olson
f85102320b extract a filepathfilter package 2016-11-21 11:38:39 -07:00
risk danger olson
ca28b34dc5 remove old parseLogOutputToPointers() tests 2016-11-21 10:49:39 -07:00
risk danger olson
bcea7ab252 Scan() should return true if it found a pointer 2016-11-21 10:36:35 -07:00
risk danger olson
39c5b4d80e rewrite logScanner using the scanner pattern 2016-11-21 09:50:40 -07:00
risk danger olson
5263073b04 convert lsTreeBlobs to scanner convention 2016-11-18 17:19:45 -07:00
Taylor Blau
fc1daa28e3 lfs: use github.com/stretchr/testify for assertions 2016-05-25 10:43:10 -06:00
Taylor Blau
4593d0a641 vendor: vendor dependencies in vendor/ using Glide
- script/vendor received an update in order to work with Glide
- import paths have been rewritten to work with GO15VENDOREXPERIMENT
2016-05-23 12:10:35 -06:00
Steve Streeting
23918960b7 Refactor all scanner-related functions to wrap channels & report async errors 2016-03-31 12:00:44 +01:00
risk danger olson
7acc064238 write a quick benchmark 2016-02-19 16:22:24 -07:00
risk danger olson
7f66b774e9 split on null 2016-02-19 16:04:35 -07:00
Steve Streeting
d543277bc8 Add tests including pointer extension data for parseLogOutputToPointers 2015-08-07 15:36:46 +01:00
Steve Streeting
b5d098a897 Make sure we have enough diff context in pointer text to cope with extensions 2015-08-05 14:47:09 +01:00
Steve Streeting
90ce6386ab Adding parsing methods to scan git log for LFS references which have been introduced or removed 2015-08-05 14:47:09 +01:00