merge conflict
This commit is contained in:
commit
74da40ac17
56
CHANGELOG.md
56
CHANGELOG.md
@ -1,5 +1,61 @@
|
||||
# Git LFS Changelog
|
||||
|
||||
## 1.3.0 (21 July 2016)
|
||||
|
||||
### Features
|
||||
|
||||
* use proxy from git config #1173, #1358 (@jonmagic, @LizzHale, @technoweenie)
|
||||
* Enhanced upload/download of LFS content: #1265 #1279 #1297 #1303 #1367 (@sinbad)
|
||||
* Resumable downloads using HTTP range headers
|
||||
* Resumable uploads using [tus.io protocol](http://tus.io)
|
||||
* Pluggable [custom transfer adapters](https://github.com/github/git-lfs/blob/master/docs/custom-transfers.md)
|
||||
* In git 2.9+, run "git lfs pull" in submodules after "git lfs clone" #1373 (@sinbad)
|
||||
* cmd,doc,test: teach `git lfs track --{no-touch,verbose,dry-run}` #1344 (@ttaylorr)
|
||||
* ⏳ Retry transfers with expired actions #1350 (@ttaylorr)
|
||||
* Safe track patterns #1346 (@ttaylorr)
|
||||
* Add checkout --unstaged flag #1262 (@orivej)
|
||||
* cmd/clone: add include/exclude via flags and config #1321 (@ttaylorr)
|
||||
* Improve progress reporting when files skipped #1296 (@sinbad)
|
||||
* Experimental file locking commands #1236, #1259, #1256, #1386 (@ttaylorr)
|
||||
* Implement support for GIT_SSH_COMMAND #1260 (@pdf)
|
||||
* Recognize include/exclude filters from config #1257 (@ttaylorr)
|
||||
|
||||
### Bugs
|
||||
|
||||
* Fix bug in Windows installer under Win32. #1200 (@teo-tsirpanis)
|
||||
* Updated request.GetAuthType to handle multi-value auth headers #1379 (@VladimirKhvostov)
|
||||
* Windows fixes #1374 (@sinbad)
|
||||
* Handle artifactory responses #1371 (@ttaylorr)
|
||||
* use `git rev-list --stdin` instead of passing each remote ref #1359 (@technoweenie)
|
||||
* docs/man: move "logs" subcommands from OPTIONS to COMMANDS #1335 (@ttaylorr)
|
||||
* test/zero-len: update test for git v2.9.1 #1369 (@ttaylorr)
|
||||
* Unbreak building httputil on OpenBSD #1360 (@jasperla)
|
||||
* WIP transferqueue race fix #1255 (@technoweenie)
|
||||
* Safety check to `comands.requireStdin` #1349 (@ttaylorr)
|
||||
* Removed CentOS 5 from dockers. Fixed #1295. #1298 (@javabrett)
|
||||
* Fix 'git lfs fetch' with a sha1 ref #1323 (@omonnier)
|
||||
* Ignore HEAD ref when fetching with --all #1310 (@ttaylorr)
|
||||
* Return a fully remote ref to reduce chances of ref clashes #1248 (@technoweenie)
|
||||
|
||||
### Misc
|
||||
|
||||
* Added Linux Mint Sarah to package cloud script #1384 (@andyneff)
|
||||
* travis-ci: require successful tests against upcoming Git core release #1372 (@larsxschneider)
|
||||
* travis-ci: add a build job to test against upcoming versions of Git #1361 (@larsxschneider)
|
||||
* Create Makefiles for building with gccgo #1222 (@zeldin)
|
||||
* README: add @ttaylorr to core team #1332 (@ttaylorr)
|
||||
* Enforced a minimum gem version of 1.0.4 for packagecloud-ruby #1292 (@javabrett)
|
||||
* I think this should be "Once installed" and not "One installed", but … #1305 (@GabLeRoux)
|
||||
* script/test: propagate extra args to go test #1324 (@omonnier)
|
||||
* Add `lfs.basictransfersonly` option to disable non-basic transfer adapters #1299 (@sinbad)
|
||||
* Debian build vendor test excludes #1291 (@javabrett)
|
||||
* gitignore: ignore lfstest-\* files #1271 (@ttaylorr)
|
||||
* Disable gojsonschema test, causes failures when firewalls block it #1274 (@sinbad)
|
||||
* test: use noop credential helper for auth tests #1267 (@ttaylorr)
|
||||
* get git tests passing when run outside of repository #1229 (@technoweenie)
|
||||
* Package refactor no.1 #1226 (@sinbad)
|
||||
* vendor: vendor dependencies in vendor/ using Glide #1243 (@ttaylorr)
|
||||
|
||||
## 1.2.1 (2 June 2016)
|
||||
|
||||
### Features
|
||||
|
@ -9,7 +9,6 @@ Git LFS. If you have an idea for a new feature, open an issue for discussion.
|
||||
* `authenticated` property on urls [#960](https://github.com/github/git-lfs/issues/960)
|
||||
* Add ref information to upload request [#969](https://github.com/github/git-lfs/issues/969)
|
||||
* Accept raw remote URLs as valid [#1085](https://github.com/github/git-lfs/issues/1085)
|
||||
* use git proxy settings [#1125](https://github.com/github/git-lfs/issues/1125)
|
||||
* Not following 301 redirect [#1129](https://github.com/github/git-lfs/issues/1129)
|
||||
* add all lfs.* git config keys to git lfs env output
|
||||
* Teach `git lfs update` how to update the clean/smudge filter values [#1083](https://github.com/github/git-lfs/pull/1083)
|
||||
|
@ -57,6 +57,12 @@ func Batch(objects []*ObjectResource, operation string, transferAdapters []strin
|
||||
|
||||
cfg := config.Config
|
||||
|
||||
// Compatibility; omit transfers list when only basic
|
||||
// older schemas included `additionalproperties=false`
|
||||
if len(transferAdapters) == 1 && transferAdapters[0] == "basic" {
|
||||
transferAdapters = nil
|
||||
}
|
||||
|
||||
o := &batchRequest{Operation: operation, Objects: objects, TransferAdapterNames: transferAdapters}
|
||||
by, err := json.Marshal(o)
|
||||
if err != nil {
|
||||
|
@ -38,7 +38,7 @@ func DoLegacyRequest(req *http.Request) (*http.Response, *ObjectResource, error)
|
||||
}
|
||||
|
||||
type batchRequest struct {
|
||||
TransferAdapterNames []string `json:"transfers"`
|
||||
TransferAdapterNames []string `json:"transfers,omitempty"`
|
||||
Operation string `json:"operation"`
|
||||
Objects []*ObjectResource `json:"objects"`
|
||||
}
|
||||
|
@ -228,34 +228,20 @@ func (c *Configuration) ConcurrentTransfers() int {
|
||||
return uploads
|
||||
}
|
||||
|
||||
// BasicTransfersOnly returns whether to only allow "basic" HTTP transfers
|
||||
// BasicTransfersOnly returns whether to only allow "basic" HTTP transfers.
|
||||
// Default is false, including if the lfs.basictransfersonly is invalid
|
||||
func (c *Configuration) BasicTransfersOnly() bool {
|
||||
value, ok := c.GitConfig("lfs.basictransfersonly")
|
||||
if !ok || len(value) == 0 {
|
||||
return false
|
||||
}
|
||||
return c.GitConfigBool("lfs.basictransfersonly", false)
|
||||
}
|
||||
|
||||
basicOnly, err := parseConfigBool(value)
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
|
||||
return basicOnly
|
||||
// TusTransfersAllowed returns whether to only use "tus.io" HTTP transfers.
|
||||
// Default is false, including if the lfs.tustransfers is invalid
|
||||
func (c *Configuration) TusTransfersAllowed() bool {
|
||||
return c.GitConfigBool("lfs.tustransfers", false)
|
||||
}
|
||||
|
||||
func (c *Configuration) BatchTransfer() bool {
|
||||
value, ok := c.GitConfig("lfs.batch")
|
||||
if !ok || len(value) == 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
useBatch, err := parseConfigBool(value)
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
|
||||
return useBatch
|
||||
return c.GitConfigBool("lfs.batch", true)
|
||||
}
|
||||
|
||||
func (c *Configuration) NtlmAccess(operation string) bool {
|
||||
|
@ -365,6 +365,35 @@ func TestBasicTransfersOnlyInvalidValue(t *testing.T) {
|
||||
assert.Equal(t, false, b)
|
||||
}
|
||||
|
||||
func TestTusTransfersAllowedSetValue(t *testing.T) {
|
||||
config := &Configuration{
|
||||
gitConfig: map[string]string{
|
||||
"lfs.tustransfers": "true",
|
||||
},
|
||||
}
|
||||
|
||||
b := config.TusTransfersAllowed()
|
||||
assert.Equal(t, true, b)
|
||||
}
|
||||
|
||||
func TestTusTransfersAllowedDefault(t *testing.T) {
|
||||
config := &Configuration{}
|
||||
|
||||
b := config.TusTransfersAllowed()
|
||||
assert.Equal(t, false, b)
|
||||
}
|
||||
|
||||
func TestTusTransfersAllowedInvalidValue(t *testing.T) {
|
||||
config := &Configuration{
|
||||
gitConfig: map[string]string{
|
||||
"lfs.tustransfers": "wat",
|
||||
},
|
||||
}
|
||||
|
||||
b := config.TusTransfersAllowed()
|
||||
assert.Equal(t, false, b)
|
||||
}
|
||||
|
||||
func TestBatch(t *testing.T) {
|
||||
tests := map[string]bool{
|
||||
"": true,
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
|
||||
var (
|
||||
GitCommit string
|
||||
Version = "1.2.0"
|
||||
Version = "1.3.0"
|
||||
VersionDesc string
|
||||
)
|
||||
|
||||
|
6
debian/changelog
vendored
6
debian/changelog
vendored
@ -1,3 +1,9 @@
|
||||
git-lfs (1.3.0) stable; urgency=low
|
||||
|
||||
* New upstream version
|
||||
|
||||
-- Stephen Gelman <gelman@getbraintree.com> Thu, 21 Jul 2016 14:29:00 +0000
|
||||
|
||||
git-lfs (1.2.1) stable; urgency=low
|
||||
|
||||
* New upstream version
|
||||
|
3
debian/rules
vendored
3
debian/rules
vendored
@ -13,8 +13,9 @@ endif
|
||||
BUILD_DIR := obj-$(DEB_HOST_GNU_TYPE)
|
||||
export DH_GOPKG := github.com/github/git-lfs
|
||||
# DH_GOLANG_EXCLUDES typically incorporates vendor exclusions from script/test
|
||||
export DH_GOLANG_EXCLUDES := test github.com/olekukonko/ts/* github.com/xeipuuv/gojsonschema/* github.com/technoweenie/go-contentaddressable/* github.com/spf13/cobra/*
|
||||
export DH_GOLANG_EXCLUDES := test github.com/olekukonko/ts/* github.com/xeipuuv/* github.com/technoweenie/go-contentaddressable/* github.com/spf13/cobra/* github.com/kr/*
|
||||
export PATH := $(CURDIR)/$(BUILD_DIR)/bin:$(PATH)
|
||||
|
||||
# by-default, dh_golang only copies *.go and other source - this upsets a bunch of vendor test routines
|
||||
export DH_GOLANG_INSTALL_ALL := 1
|
||||
|
||||
|
@ -54,15 +54,21 @@ lfs option can be scoped inside the configuration for a remote.
|
||||
|
||||
* `lfs.basictransfersonly`
|
||||
|
||||
If set to true, only basic HTTP upload/download transfers will be used,
|
||||
If set to true, only basic HTTP upload/download transfers will be used,
|
||||
ignoring any more advanced transfers that the client/server may support.
|
||||
This is primarily to work around bugs or incompatibilities.
|
||||
|
||||
The git-lfs client supports basic HTTP downloads, resumable HTTP downloads
|
||||
The git-lfs client supports basic HTTP downloads, resumable HTTP downloads
|
||||
(using `Range` headers), and resumable uploads via tus.io protocol. Custom
|
||||
transfer methods can be added via `lfs.customtransfer` (see next section).
|
||||
However setting this value to true limits the client to simple HTTP.
|
||||
|
||||
* `lfs.tustransfers`
|
||||
|
||||
If set to true, this enables resumable uploads of LFS objects through the
|
||||
tus.io API. Once this feature is finalized, this setting will be removed,
|
||||
and tus.io uploads will be available for all clients.
|
||||
|
||||
* `lfs.customtransfer.<name>.path`
|
||||
|
||||
`lfs.customtransfer.<name>` is a settings group which defines a custom
|
||||
@ -71,7 +77,7 @@ lfs option can be scoped inside the configuration for a remote.
|
||||
the process you wish to invoke. The protocol between the git-lfs client and
|
||||
the custom transfer process is documented at
|
||||
https://github.com/github/git-lfs/blob/master/docs/custom-transfers.md
|
||||
|
||||
|
||||
<name> must be a unique identifier that the LFS server understands. When
|
||||
calling the LFS API the client will include a list of supported transfer
|
||||
types. If the server also supports this named transfer type, it will select it
|
||||
@ -82,7 +88,7 @@ lfs option can be scoped inside the configuration for a remote.
|
||||
* `lfs.customtransfer.<name>.args`
|
||||
|
||||
If the custom transfer process requires any arguments, these can be provided
|
||||
here.
|
||||
here.
|
||||
|
||||
* `lfs.customtransfer.<name>.concurrent`
|
||||
|
||||
@ -92,7 +98,7 @@ lfs option can be scoped inside the configuration for a remote.
|
||||
|
||||
* `lfs.customtransfer.<name>.direction`
|
||||
|
||||
Specifies which direction the custom transfer process supports, either
|
||||
Specifies which direction the custom transfer process supports, either
|
||||
"download", "upload", or "both". The default if unspecified is "both".
|
||||
|
||||
### Fetch settings
|
||||
@ -188,9 +194,9 @@ lfs option can be scoped inside the configuration for a remote.
|
||||
report success even in cases when LFS downloads fail, which may affect
|
||||
scripts.
|
||||
|
||||
You can also set the environment variable GIT_LFS_SKIP_DOWNLOAD_ERRORS=1 to
|
||||
get the same effect.
|
||||
|
||||
You can also set the environment variable GIT_LFS_SKIP_DOWNLOAD_ERRORS=1 to
|
||||
get the same effect.
|
||||
|
||||
## SEE ALSO
|
||||
|
||||
git-config(1), git-lfs-install(1), gitattributes(5)
|
||||
|
12
lfs/lfs.go
12
lfs/lfs.go
@ -6,16 +6,18 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/github/git-lfs/config"
|
||||
"github.com/github/git-lfs/localstorage"
|
||||
"github.com/github/git-lfs/tools"
|
||||
"github.com/github/git-lfs/transfer"
|
||||
"github.com/rubyist/tracerx"
|
||||
)
|
||||
|
||||
const (
|
||||
Version = "1.2.1"
|
||||
Version = "1.3.0"
|
||||
)
|
||||
|
||||
var (
|
||||
@ -68,6 +70,11 @@ func ObjectExistsOfSize(oid string, size int64) bool {
|
||||
func Environ() []string {
|
||||
osEnviron := os.Environ()
|
||||
env := make([]string, 0, len(osEnviron)+7)
|
||||
dltransfers := transfer.GetDownloadAdapterNames()
|
||||
sort.Strings(dltransfers)
|
||||
ultransfers := transfer.GetUploadAdapterNames()
|
||||
sort.Strings(ultransfers)
|
||||
|
||||
env = append(env,
|
||||
fmt.Sprintf("LocalWorkingDir=%s", config.LocalWorkingDir),
|
||||
fmt.Sprintf("LocalGitDir=%s", config.LocalGitDir),
|
||||
@ -76,6 +83,7 @@ func Environ() []string {
|
||||
fmt.Sprintf("LocalReferenceDir=%s", config.LocalReferenceDir),
|
||||
fmt.Sprintf("TempDir=%s", TempDir()),
|
||||
fmt.Sprintf("ConcurrentTransfers=%d", config.Config.ConcurrentTransfers()),
|
||||
fmt.Sprintf("TusTransfers=%v", config.Config.TusTransfersAllowed()),
|
||||
fmt.Sprintf("BasicTransfersOnly=%v", config.Config.BasicTransfersOnly()),
|
||||
fmt.Sprintf("BatchTransfer=%v", config.Config.BatchTransfer()),
|
||||
fmt.Sprintf("SkipDownloadErrors=%v", config.Config.SkipDownloadErrors()),
|
||||
@ -88,6 +96,8 @@ func Environ() []string {
|
||||
fmt.Sprintf("PruneRemoteName=%s", config.Config.FetchPruneConfig().PruneRemoteName),
|
||||
fmt.Sprintf("AccessDownload=%s", config.Config.Access("download")),
|
||||
fmt.Sprintf("AccessUpload=%s", config.Config.Access("upload")),
|
||||
fmt.Sprintf("DownloadTransfers=%s", strings.Join(dltransfers, ",")),
|
||||
fmt.Sprintf("UploadTransfers=%s", strings.Join(ultransfers, ",")),
|
||||
)
|
||||
if len(config.Config.FetchExcludePaths()) > 0 {
|
||||
env = append(env, fmt.Sprintf("FetchExclude=%s", strings.Join(config.Config.FetchExcludePaths(), ", ")))
|
||||
|
@ -1,5 +1,5 @@
|
||||
Name: git-lfs
|
||||
Version: 1.2.1
|
||||
Version: 1.3.0
|
||||
Release: 1%{?dist}
|
||||
Summary: Git extension for versioning large files
|
||||
|
||||
@ -24,6 +24,7 @@ Enterprise.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{version}
|
||||
export GOPATH=`pwd`
|
||||
mkdir -p src/github.com/github
|
||||
ln -s $(pwd) src/github.com/github/%{name}
|
||||
|
||||
@ -31,12 +32,15 @@ ln -s $(pwd) src/github.com/github/%{name}
|
||||
%if 0%{?rhel} == 5
|
||||
export CGO_ENABLED=0
|
||||
%endif
|
||||
%if %{_arch} == i386
|
||||
GOARCH=386 GOPATH=`pwd` ./script/bootstrap
|
||||
%else
|
||||
GOARCH=amd64 GOPATH=`pwd` ./script/bootstrap
|
||||
%endif
|
||||
GOPATH=`pwd` ./script/man
|
||||
|
||||
pushd src/github.com/github/%{name}
|
||||
%if %{_arch} == i386
|
||||
GOARCH=386 ./script/bootstrap
|
||||
%else
|
||||
GOARCH=amd64 ./script/bootstrap
|
||||
%endif
|
||||
popd
|
||||
./script/man
|
||||
|
||||
%install
|
||||
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
|
||||
@ -50,8 +54,15 @@ install -D man/*.5 ${RPM_BUILD_ROOT}/usr/share/man/man5
|
||||
export GOPATH=`pwd`
|
||||
export GIT_LFS_TEST_DIR=$(mktemp -d)
|
||||
|
||||
./script/test
|
||||
./script/integration
|
||||
# test/git-lfs-server-api/main.go does not compile because github.com/spf13/cobra
|
||||
# cannot be found in vendor, for some reason. It's not needed for installs, so
|
||||
# skip it.
|
||||
export SKIPAPITESTCOMPILE=1
|
||||
|
||||
pushd src/github.com/github/%{name}
|
||||
./script/test
|
||||
./script/integration
|
||||
popd
|
||||
|
||||
rmdir ${GIT_LFS_TEST_DIR}
|
||||
|
||||
|
@ -141,7 +141,7 @@ fi
|
||||
pushd ${CURDIR}/..
|
||||
#Yes, compile lfs before compiling lfs...
|
||||
./script/bootstrap
|
||||
#Use the version output to grab the version number and short sha
|
||||
#Use the version output to grab the version number and short sha
|
||||
#(that yes, I could have gotten from git myself)
|
||||
LFS_VERSION=$(./bin/git-lfs version | sed -r 's|.*/([0-9.]*).*|\1|')
|
||||
sed -i 's|\(^Version:\s*\).*|\1'"${LFS_VERSION}"'|' ${CURDIR}/SPECS/git-lfs.spec
|
||||
@ -152,27 +152,26 @@ popd
|
||||
|
||||
#Prep the SOURCES dir for git-lfs
|
||||
echo "Zipping up current checkout of git-lfs..."
|
||||
|
||||
rm -rvf ${CURDIR}/tmptar
|
||||
|
||||
echo "Cleaning ${CURDIR}/tmptar"
|
||||
rm -rf ${CURDIR}/tmptar
|
||||
|
||||
mkdir -p ${CURDIR}/tmptar/git-lfs-${LFS_VERSION}
|
||||
pushd ${CURDIR}/..
|
||||
#I started running out of space in the docker, so I needed to copy a little less waste
|
||||
tar -c . --exclude tmptar --exclude repos | tar -x -C ${CURDIR}/tmptar/git-lfs-${LFS_VERSION}/
|
||||
popd
|
||||
pushd ${CURDIR}/tmptar/git-lfs-${LFS_VERSION}
|
||||
git clean -xdf
|
||||
rm -rvf .git
|
||||
popd
|
||||
pushd ${CURDIR}/tmptar
|
||||
tar -zcf ${CURDIR}/SOURCES/git-lfs-${LFS_VERSION}.tar.gz git-lfs-${LFS_VERSION}
|
||||
popd
|
||||
rm -rvf ${CURDIR}/tmptar
|
||||
|
||||
|
||||
echo "Cleaning ${CURDIR}/tmptar again"
|
||||
rm -rf ${CURDIR}/tmptar
|
||||
|
||||
#TODO TASK 2
|
||||
#cp ${CURDIR}/../docker/public.key ${CURDIR}/SOURCES/RPM-GPG-KEY-GITLFS
|
||||
touch ${CURDIR}/SOURCES/RPM-GPG-KEY-GITLFS
|
||||
|
||||
|
||||
echo "Build git-lfs rpm..."
|
||||
|
||||
#--no-deps added for now so you can compile without offical rpms installed
|
||||
|
@ -2,7 +2,7 @@
|
||||
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
|
||||
|
||||
#define MyAppName "Git LFS"
|
||||
#define MyAppVersion "1.2.1"
|
||||
#define MyAppVersion "1.3.0"
|
||||
#define MyAppPublisher "GitHub, Inc"
|
||||
#define MyAppURL "https://git-lfs.github.com/"
|
||||
#define MyAppFilePrefix "git-lfs-windows"
|
||||
|
@ -8,7 +8,7 @@ ensure_git_version_isnt $VERSION_LOWER "2.3.0"
|
||||
# if there is a system cred helper we can't run this test
|
||||
# can't disable without changing state outside test & probably don't have permission
|
||||
# this is common on OS X with certain versions of Git installed, default cred helper
|
||||
if [[ "$(git config --system credential.helper)" -ne "" ]]; then
|
||||
if [[ -n "$(git config --system credential.helper)" ]]; then
|
||||
echo "skip: $0 (system cred helper we can't disable)"
|
||||
exit
|
||||
fi
|
||||
|
105
test/test-env.sh
105
test/test-env.sh
@ -30,6 +30,7 @@ LocalMediaDir=%s
|
||||
LocalReferenceDir=
|
||||
TempDir=%s
|
||||
ConcurrentTransfers=3
|
||||
TusTransfers=false
|
||||
BasicTransfersOnly=false
|
||||
BatchTransfer=true
|
||||
SkipDownloadErrors=false
|
||||
@ -42,6 +43,8 @@ PruneVerifyRemoteAlways=false
|
||||
PruneRemoteName=origin
|
||||
AccessDownload=none
|
||||
AccessUpload=none
|
||||
DownloadTransfers=basic
|
||||
UploadTransfers=basic
|
||||
%s
|
||||
%s
|
||||
' "$(git lfs version)" "$(git version)" "$localwd" "$localgit" "$localgitstore" "$localmedia" "$tempdir" "$envVars" "$envInitConfig")
|
||||
@ -78,6 +81,7 @@ LocalMediaDir=%s
|
||||
LocalReferenceDir=
|
||||
TempDir=%s
|
||||
ConcurrentTransfers=3
|
||||
TusTransfers=false
|
||||
BasicTransfersOnly=false
|
||||
BatchTransfer=true
|
||||
SkipDownloadErrors=false
|
||||
@ -90,6 +94,8 @@ PruneVerifyRemoteAlways=false
|
||||
PruneRemoteName=origin
|
||||
AccessDownload=none
|
||||
AccessUpload=none
|
||||
DownloadTransfers=basic
|
||||
UploadTransfers=basic
|
||||
%s
|
||||
%s
|
||||
' "$(git lfs version)" "$(git version)" "$endpoint" "$localwd" "$localgit" "$localgitstore" "$localmedia" "$tempdir" "$envVars" "$envInitConfig")
|
||||
@ -133,6 +139,7 @@ LocalMediaDir=%s
|
||||
LocalReferenceDir=
|
||||
TempDir=%s
|
||||
ConcurrentTransfers=3
|
||||
TusTransfers=false
|
||||
BasicTransfersOnly=false
|
||||
BatchTransfer=true
|
||||
SkipDownloadErrors=false
|
||||
@ -145,6 +152,8 @@ PruneVerifyRemoteAlways=false
|
||||
PruneRemoteName=origin
|
||||
AccessDownload=none
|
||||
AccessUpload=none
|
||||
DownloadTransfers=basic
|
||||
UploadTransfers=basic
|
||||
%s
|
||||
%s
|
||||
' "$(git lfs version)" "$(git version)" "$endpoint" "$endpoint2" "$localwd" "$localgit" "$localgitstore" "$localmedia" "$tempdir" "$envVars" "$envInitConfig")
|
||||
@ -186,6 +195,7 @@ LocalMediaDir=%s
|
||||
LocalReferenceDir=
|
||||
TempDir=%s
|
||||
ConcurrentTransfers=3
|
||||
TusTransfers=false
|
||||
BasicTransfersOnly=false
|
||||
BatchTransfer=true
|
||||
SkipDownloadErrors=false
|
||||
@ -198,6 +208,8 @@ PruneVerifyRemoteAlways=false
|
||||
PruneRemoteName=origin
|
||||
AccessDownload=none
|
||||
AccessUpload=none
|
||||
DownloadTransfers=basic
|
||||
UploadTransfers=basic
|
||||
%s
|
||||
%s
|
||||
' "$(git lfs version)" "$(git version)" "$endpoint" "$localwd" "$localgit" "$localgitstore" "$localmedia" "$tempdir" "$envVars" "$envInitConfig")
|
||||
@ -241,6 +253,7 @@ LocalMediaDir=%s
|
||||
LocalReferenceDir=
|
||||
TempDir=%s
|
||||
ConcurrentTransfers=3
|
||||
TusTransfers=false
|
||||
BasicTransfersOnly=false
|
||||
BatchTransfer=true
|
||||
SkipDownloadErrors=false
|
||||
@ -253,6 +266,8 @@ PruneVerifyRemoteAlways=false
|
||||
PruneRemoteName=origin
|
||||
AccessDownload=none
|
||||
AccessUpload=none
|
||||
DownloadTransfers=basic
|
||||
UploadTransfers=basic
|
||||
%s
|
||||
%s
|
||||
' "$(git lfs version)" "$(git version)" "$endpoint" "$localwd" "$localgit" "$localgitstore" "$localmedia" "$tempdir" "$envVars" "$envInitConfig")
|
||||
@ -297,6 +312,7 @@ LocalMediaDir=%s
|
||||
LocalReferenceDir=
|
||||
TempDir=%s
|
||||
ConcurrentTransfers=3
|
||||
TusTransfers=false
|
||||
BasicTransfersOnly=false
|
||||
BatchTransfer=true
|
||||
SkipDownloadErrors=false
|
||||
@ -309,6 +325,8 @@ PruneVerifyRemoteAlways=false
|
||||
PruneRemoteName=origin
|
||||
AccessDownload=none
|
||||
AccessUpload=none
|
||||
DownloadTransfers=basic
|
||||
UploadTransfers=basic
|
||||
%s
|
||||
%s
|
||||
' "$(git lfs version)" "$(git version)" "$localwd" "$localgit" "$localgitstore" "$localmedia" "$tempdir" "$envVars" "$envInitConfig")
|
||||
@ -355,6 +373,7 @@ LocalMediaDir=%s
|
||||
LocalReferenceDir=
|
||||
TempDir=%s
|
||||
ConcurrentTransfers=5
|
||||
TusTransfers=false
|
||||
BasicTransfersOnly=false
|
||||
BatchTransfer=false
|
||||
SkipDownloadErrors=false
|
||||
@ -367,6 +386,8 @@ PruneVerifyRemoteAlways=false
|
||||
PruneRemoteName=origin
|
||||
AccessDownload=none
|
||||
AccessUpload=none
|
||||
DownloadTransfers=basic
|
||||
UploadTransfers=basic
|
||||
%s
|
||||
%s
|
||||
' "$(git lfs version)" "$(git version)" "$localwd" "$localgit" "$localgitstore" "$localmedia" "$tempdir" "$envVars" "$envInitConfig")
|
||||
@ -419,6 +440,7 @@ LocalMediaDir=%s
|
||||
LocalReferenceDir=
|
||||
TempDir=%s
|
||||
ConcurrentTransfers=3
|
||||
TusTransfers=false
|
||||
BasicTransfersOnly=false
|
||||
BatchTransfer=true
|
||||
SkipDownloadErrors=false
|
||||
@ -431,6 +453,8 @@ PruneVerifyRemoteAlways=false
|
||||
PruneRemoteName=origin
|
||||
AccessDownload=none
|
||||
AccessUpload=none
|
||||
DownloadTransfers=basic
|
||||
UploadTransfers=basic
|
||||
%s
|
||||
%s
|
||||
' "$(git lfs version)" "$(git version)" "$localwd" "$localgit" "$localgitstore" "$localmedia" "$tempdir" "$envVars" "$envInitConfig")
|
||||
@ -477,6 +501,7 @@ LocalMediaDir=%s
|
||||
LocalReferenceDir=
|
||||
TempDir=%s
|
||||
ConcurrentTransfers=3
|
||||
TusTransfers=false
|
||||
BasicTransfersOnly=false
|
||||
BatchTransfer=true
|
||||
SkipDownloadErrors=false
|
||||
@ -489,6 +514,8 @@ PruneVerifyRemoteAlways=false
|
||||
PruneRemoteName=origin
|
||||
AccessDownload=none
|
||||
AccessUpload=none
|
||||
DownloadTransfers=basic
|
||||
UploadTransfers=basic
|
||||
%s
|
||||
%s
|
||||
' "$(git lfs version)" "$(git version)" "$localwd" "$localgit" "$localgitstore" "$localmedia" "$tempdir" "$envVars" "$envInitConfig")
|
||||
@ -528,6 +555,7 @@ LocalMediaDir=%s
|
||||
LocalReferenceDir=
|
||||
TempDir=%s
|
||||
ConcurrentTransfers=3
|
||||
TusTransfers=false
|
||||
BasicTransfersOnly=false
|
||||
BatchTransfer=true
|
||||
SkipDownloadErrors=false
|
||||
@ -540,6 +568,8 @@ PruneVerifyRemoteAlways=false
|
||||
PruneRemoteName=origin
|
||||
AccessDownload=none
|
||||
AccessUpload=none
|
||||
DownloadTransfers=basic
|
||||
UploadTransfers=basic
|
||||
%s
|
||||
%s
|
||||
' "$(git lfs version)" "$(git version)" "$localwd" "$localgit" "$localgitstore" "$localmedia" "$tempdir" "$envVars" "$envInitConfig")
|
||||
@ -570,6 +600,7 @@ LocalMediaDir=%s
|
||||
LocalReferenceDir=
|
||||
TempDir=%s
|
||||
ConcurrentTransfers=3
|
||||
TusTransfers=false
|
||||
BasicTransfersOnly=false
|
||||
BatchTransfer=true
|
||||
SkipDownloadErrors=false
|
||||
@ -582,6 +613,8 @@ PruneVerifyRemoteAlways=false
|
||||
PruneRemoteName=origin
|
||||
AccessDownload=none
|
||||
AccessUpload=none
|
||||
DownloadTransfers=basic
|
||||
UploadTransfers=basic
|
||||
%s
|
||||
git config filter.lfs.smudge = \"\"
|
||||
git config filter.lfs.clean = \"\"
|
||||
@ -601,6 +634,7 @@ LocalMediaDir=%s
|
||||
LocalReferenceDir=
|
||||
TempDir=%s
|
||||
ConcurrentTransfers=3
|
||||
TusTransfers=false
|
||||
BasicTransfersOnly=false
|
||||
BatchTransfer=true
|
||||
SkipDownloadErrors=false
|
||||
@ -613,6 +647,8 @@ PruneVerifyRemoteAlways=false
|
||||
PruneRemoteName=origin
|
||||
AccessDownload=none
|
||||
AccessUpload=none
|
||||
DownloadTransfers=basic
|
||||
UploadTransfers=basic
|
||||
%s
|
||||
%s
|
||||
' "$(git lfs version)" "$(git version)" "$localwd" "$localgit" "$localgitstore" "$localmedia" "$tempdir" "$envVars" "$envInitConfig")
|
||||
@ -631,6 +667,7 @@ LocalMediaDir=%s
|
||||
LocalReferenceDir=
|
||||
TempDir=%s
|
||||
ConcurrentTransfers=3
|
||||
TusTransfers=false
|
||||
BasicTransfersOnly=false
|
||||
BatchTransfer=true
|
||||
SkipDownloadErrors=false
|
||||
@ -643,6 +680,8 @@ PruneVerifyRemoteAlways=false
|
||||
PruneRemoteName=origin
|
||||
AccessDownload=none
|
||||
AccessUpload=none
|
||||
DownloadTransfers=basic
|
||||
UploadTransfers=basic
|
||||
%s
|
||||
%s
|
||||
' "$(git lfs version)" "$(git version)" "$localwd" "$localgit" "$localgitstore" "$localmedia" "$tempdir" "$envVars" "$envInitConfig")
|
||||
@ -672,6 +711,7 @@ LocalMediaDir=%s
|
||||
LocalReferenceDir=
|
||||
TempDir=%s
|
||||
ConcurrentTransfers=3
|
||||
TusTransfers=false
|
||||
BasicTransfersOnly=false
|
||||
BatchTransfer=true
|
||||
SkipDownloadErrors=false
|
||||
@ -684,6 +724,8 @@ PruneVerifyRemoteAlways=false
|
||||
PruneRemoteName=origin
|
||||
AccessDownload=none
|
||||
AccessUpload=none
|
||||
DownloadTransfers=basic
|
||||
UploadTransfers=basic
|
||||
%s
|
||||
%s
|
||||
" "$(git lfs version)" "$(git version)" "$localgit" "$localgitstore" "$localmedia" "$tempdir" "$envVars" "$envInitConfig")
|
||||
@ -744,6 +786,7 @@ LocalMediaDir=%s
|
||||
LocalReferenceDir=
|
||||
TempDir=%s
|
||||
ConcurrentTransfers=3
|
||||
TusTransfers=false
|
||||
BasicTransfersOnly=false
|
||||
BatchTransfer=true
|
||||
SkipDownloadErrors=true
|
||||
@ -756,6 +799,8 @@ PruneVerifyRemoteAlways=false
|
||||
PruneRemoteName=origin
|
||||
AccessDownload=none
|
||||
AccessUpload=none
|
||||
DownloadTransfers=basic
|
||||
UploadTransfers=basic
|
||||
%s
|
||||
%s
|
||||
' "$(git lfs version)" "$(git version)" "$localwd" "$localgit" "$localgitstore" "$localmedia" "$tempdir" "$envVars" "$envInitConfig")
|
||||
@ -774,6 +819,7 @@ LocalMediaDir=%s
|
||||
LocalReferenceDir=
|
||||
TempDir=%s
|
||||
ConcurrentTransfers=3
|
||||
TusTransfers=false
|
||||
BasicTransfersOnly=false
|
||||
BatchTransfer=true
|
||||
SkipDownloadErrors=true
|
||||
@ -786,6 +832,8 @@ PruneVerifyRemoteAlways=false
|
||||
PruneRemoteName=origin
|
||||
AccessDownload=none
|
||||
AccessUpload=none
|
||||
DownloadTransfers=basic
|
||||
UploadTransfers=basic
|
||||
%s
|
||||
%s
|
||||
' "$(git lfs version)" "$(git version)" "$localwd" "$localgit" "$localgitstore" "$localmedia" "$tempdir" "$envVars" "$envInitConfig")
|
||||
@ -799,5 +847,62 @@ AccessUpload=none
|
||||
|
||||
|
||||
|
||||
)
|
||||
end_test
|
||||
|
||||
begin_test "env with extra transfer methods"
|
||||
(
|
||||
set -e
|
||||
reponame="env-with-transfers"
|
||||
git init $reponame
|
||||
cd $reponame
|
||||
|
||||
git config lfs.tustransfers true
|
||||
git config lfs.customtransfer.supertransfer.path /path/to/something
|
||||
|
||||
localgit=$(native_path "$TRASHDIR/$reponame")
|
||||
localgitstore=$(native_path "$TRASHDIR/$reponame")
|
||||
localmedia=$(native_path "$TRASHDIR/$reponame/lfs/objects")
|
||||
tempdir=$(native_path "$TRASHDIR/$reponame/lfs/tmp")
|
||||
envVars=$(printf "%s" "$(env | grep "^GIT")")
|
||||
|
||||
localwd=$(native_path "$TRASHDIR/$reponame")
|
||||
localgit=$(native_path "$TRASHDIR/$reponame/.git")
|
||||
localgitstore=$(native_path "$TRASHDIR/$reponame/.git")
|
||||
localmedia=$(native_path "$TRASHDIR/$reponame/.git/lfs/objects")
|
||||
tempdir=$(native_path "$TRASHDIR/$reponame/.git/lfs/tmp")
|
||||
envVars=$(printf "%s" "$(env | grep "^GIT")")
|
||||
|
||||
expectedenabled=$(printf '%s
|
||||
%s
|
||||
|
||||
LocalWorkingDir=%s
|
||||
LocalGitDir=%s
|
||||
LocalGitStorageDir=%s
|
||||
LocalMediaDir=%s
|
||||
LocalReferenceDir=
|
||||
TempDir=%s
|
||||
ConcurrentTransfers=3
|
||||
TusTransfers=true
|
||||
BasicTransfersOnly=false
|
||||
BatchTransfer=true
|
||||
SkipDownloadErrors=false
|
||||
FetchRecentAlways=false
|
||||
FetchRecentRefsDays=7
|
||||
FetchRecentCommitsDays=0
|
||||
FetchRecentRefsIncludeRemotes=true
|
||||
PruneOffsetDays=3
|
||||
PruneVerifyRemoteAlways=false
|
||||
PruneRemoteName=origin
|
||||
AccessDownload=none
|
||||
AccessUpload=none
|
||||
DownloadTransfers=basic,supertransfer
|
||||
UploadTransfers=basic,supertransfer,tus
|
||||
%s
|
||||
%s
|
||||
' "$(git lfs version)" "$(git version)" "$localwd" "$localgit" "$localgitstore" "$localmedia" "$tempdir" "$envVars" "$envInitConfig")
|
||||
actual=$(git lfs env)
|
||||
contains_same_elements "$expectedenabled" "$actual"
|
||||
|
||||
)
|
||||
end_test
|
||||
|
@ -11,6 +11,7 @@ begin_test "tus-upload-uninterrupted"
|
||||
setup_remote_repo "$reponame"
|
||||
|
||||
clone_repo "$reponame" $reponame
|
||||
git config lfs.tustransfers true
|
||||
|
||||
git lfs track "*.dat" 2>&1 | tee track.log
|
||||
grep "Tracking \*.dat" track.log
|
||||
@ -34,12 +35,13 @@ begin_test "tus-upload-interrupted-resume"
|
||||
(
|
||||
set -e
|
||||
|
||||
# this repo name is the indicator to the server to use tus, AND to
|
||||
# this repo name is the indicator to the server to use tus, AND to
|
||||
# interrupt the upload part way
|
||||
reponame="test-tus-upload-interrupt"
|
||||
setup_remote_repo "$reponame"
|
||||
|
||||
clone_repo "$reponame" $reponame
|
||||
git config lfs.tustransfers true
|
||||
|
||||
git lfs track "*.dat" 2>&1 | tee track.log
|
||||
grep "Tracking \*.dat" track.log
|
||||
@ -66,4 +68,3 @@ begin_test "tus-upload-interrupted-resume"
|
||||
|
||||
)
|
||||
end_test
|
||||
|
||||
|
@ -27,6 +27,7 @@ LocalMediaDir=$(native_path_escaped "$TRASHDIR/$reponame/.git/lfs/objects")
|
||||
LocalReferenceDir=
|
||||
TempDir=$(native_path_escaped "$TRASHDIR/$reponame/.git/lfs/tmp")
|
||||
ConcurrentTransfers=3
|
||||
TusTransfers=false
|
||||
BasicTransfersOnly=false
|
||||
BatchTransfer=true
|
||||
SkipDownloadErrors=false
|
||||
@ -39,6 +40,8 @@ PruneVerifyRemoteAlways=false
|
||||
PruneRemoteName=origin
|
||||
AccessDownload=none
|
||||
AccessUpload=none
|
||||
DownloadTransfers=basic
|
||||
UploadTransfers=basic
|
||||
$(escape_path "$(env | grep "^GIT")")
|
||||
%s
|
||||
" "$(git lfs version)" "$(git version)" "$envInitConfig")
|
||||
@ -60,6 +63,7 @@ LocalMediaDir=$(native_path_escaped "$TRASHDIR/$reponame/.git/lfs/objects")
|
||||
LocalReferenceDir=
|
||||
TempDir=$(native_path_escaped "$TRASHDIR/$reponame/.git/worktrees/$worktreename/lfs/tmp")
|
||||
ConcurrentTransfers=3
|
||||
TusTransfers=false
|
||||
BasicTransfersOnly=false
|
||||
BatchTransfer=true
|
||||
SkipDownloadErrors=false
|
||||
@ -72,6 +76,8 @@ PruneVerifyRemoteAlways=false
|
||||
PruneRemoteName=origin
|
||||
AccessDownload=none
|
||||
AccessUpload=none
|
||||
DownloadTransfers=basic
|
||||
UploadTransfers=basic
|
||||
$(escape_path "$(env | grep "^GIT")")
|
||||
%s
|
||||
" "$(git lfs version)" "$(git version)" "$envInitConfig")
|
||||
|
@ -292,8 +292,10 @@ setup() {
|
||||
for go in test/cmd/*.go; do
|
||||
GO15VENDOREXPERIMENT=1 go build -o "$BINPATH/$(basename $go .go)" "$go"
|
||||
done
|
||||
# Ensure API test util is built during tests to ensure it stays in sync
|
||||
GO15VENDOREXPERIMENT=1 go build -o "$BINPATH/git-lfs-test-server-api" "test/git-lfs-test-server-api/main.go" "test/git-lfs-test-server-api/testdownload.go" "test/git-lfs-test-server-api/testupload.go"
|
||||
if [ -z "$SKIPAPITESTCOMPILE" ]; then
|
||||
# Ensure API test util is built during tests to ensure it stays in sync
|
||||
GO15VENDOREXPERIMENT=1 go build -o "$BINPATH/git-lfs-test-server-api" "test/git-lfs-test-server-api/main.go" "test/git-lfs-test-server-api/testdownload.go" "test/git-lfs-test-server-api/testupload.go"
|
||||
fi
|
||||
fi
|
||||
|
||||
LFSTEST_URL="$LFS_URL_FILE" LFSTEST_SSL_URL="$LFS_SSL_URL_FILE" LFSTEST_DIR="$REMOTEDIR" LFSTEST_CERT="$LFS_CERT_FILE" lfstest-gitserver > "$REMOTEDIR/gitserver.log" 2>&1 &
|
||||
|
@ -193,7 +193,7 @@ func (a *customAdapter) readResponse(ctx *customAdapterWorkerContext) (*customAd
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
tracerx.Printf("xfer: Custom adapter worker %d received response: %v", ctx.workerNum, line)
|
||||
tracerx.Printf("xfer: Custom adapter worker %d received response: %v", ctx.workerNum, strings.TrimSpace(line))
|
||||
resp := &customAdapterResponseMessage{}
|
||||
err = json.Unmarshal([]byte(line), resp)
|
||||
return resp, err
|
||||
|
@ -209,5 +209,11 @@ func initCoreAdaptersIfRequired() {
|
||||
// That's why this isn't in an init() block
|
||||
initCoreOnce.Do(func() {
|
||||
ConfigureCustomAdapters()
|
||||
|
||||
// tus.io upload adapter is still experimental, requires
|
||||
// `lfs.tustransfers=true` to activate.
|
||||
if !config.Config.TusTransfersAllowed() {
|
||||
delete(uploadAdapterFuncs, TusAdapterName)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user