Commit Graph

13 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
10c4ffc6b8
Use subprocess for invoking all commands
The fix for CVE-2020-27955 was incomplete because we did not consider
places outside of the subprocess code that invoke binaries.  As a
result, there are still some places where an attacker can execute
arbitrary code by placing a malicious binary in the repository.

To make sure we've covered all the bases, let's just use the subprocess
code for executing all programs, which means that they'll be secure.  As
of this commit, all users of exec.Command are in test code or the
subprocess code itself.
2020-12-21 22:19:04 +00:00
Marat Radchenko
482260c7e3 Fix error strings to follow Go guidelines
Error strings should not be capitalized (unless beginning with proper nouns or acronyms) or end with punctuation:
https://github.com/golang/go/wiki/CodeReviewComments#error-strings
2019-10-22 17:33:49 +03:00
brian m. carlson
286c64c34b
lfs: honor umask when writing LFS file storage
When writing files to the LFS file storage, we create a temporary file
and rename it into its correct place.  Use the function that was
recently introduced to create a temporary file that honors the umask.
This should make all uses of Git LFS honor the umask, since Git handles
writing the working tree files for us.

We compute the proper permissions value on demand.  In a future commit,
we'll need to read the configuration file, and on clone, we'll want to
wait to read the configuration until we have a repository.

Add a test for this and skip it on Windows, since we cannot be
guaranteed to have POSIX permission support there.
2018-10-09 15:11:17 +00:00
rick olson
1cfb016669 lfs,localstorage: remove TempFile config in favor of fs package 2017-10-24 18:59:36 -06:00
Taylor Blau
1771b6c853 lfs/extension: forcibly kill -9 open extension proceses from early return 2017-04-27 16:01:45 -06:00
risk danger olson
bba8f3b876 update package imports 2016-11-15 10:01:18 -07:00
Steve Streeting
c4bbd3724e Major refactor to pull things into config, httputil, tools
Mainly required to avoid cyclical dependencies when separating other things
2016-05-13 17:38:06 +01:00
Rick Olson
36946ecbb8 refactor lfs.SortExtensions
* fewer slice iterations
* slices are initialized with the correct capacity
2015-08-04 08:48:26 -06:00
Ryan Simmen
8d7769ac09 LFS Extensions: smudge command 2015-07-31 17:08:21 -04:00
Ryan Simmen
d010bf9f5c LFS Extensions: clean command 2015-07-31 17:07:35 -04:00
Ryan Simmen
ffd52e67b8 LFS Extensions: git-lfs ext command 2015-07-31 17:07:35 -04:00