From 44cc32dee8a0c0b46464abad7c7eeb30c918b67e Mon Sep 17 00:00:00 2001 From: Steve Streeting Date: Tue, 10 Jan 2017 10:19:57 +0000 Subject: [PATCH 1/3] Add failing test --- test/test-custom-transfers.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/test-custom-transfers.sh b/test/test-custom-transfers.sh index 63b97317..85fe7e26 100755 --- a/test/test-custom-transfers.sh +++ b/test/test-custom-transfers.sh @@ -103,6 +103,8 @@ begin_test "custom-transfer-upload-download" grep "xfer\[lfstest-customadapter\]:" fetchcustom.log grep "11 of 11 files" fetchcustom.log + grep "Terminating test custom adapter gracefully" fetchcustom.log + objectlist=`find .git/lfs/objects -type f` [ "$(echo "$objectlist" | wc -l)" -eq 11 ] ) From f8b89a7a51aab62937d6db1f93743702d412a993 Mon Sep 17 00:00:00 2001 From: Steve Streeting Date: Tue, 10 Jan 2017 10:20:23 +0000 Subject: [PATCH 2/3] =?UTF-8?q?Fix=20terminate=20request=20from=20custom?= =?UTF-8?q?=20transfer,=20should=20be=20=E2=80=9Cevent=E2=80=9D=20not=20?= =?UTF-8?q?=E2=80=9Ctype=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tq/custom.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tq/custom.go b/tq/custom.go index 9c0a1ad8..722d3a81 100644 --- a/tq/custom.go +++ b/tq/custom.go @@ -86,7 +86,7 @@ func NewCustomAdapterDownloadRequest(oid string, size int64, action *Action) *cu } type customAdapterTerminateRequest struct { - MessageType string `json:"type"` + Event string `json:"event"` } func NewCustomAdapterTerminateRequest() *customAdapterTerminateRequest { From 0da5514962ae83ec52d92d97f54528eaaca3c486 Mon Sep 17 00:00:00 2001 From: Steve Streeting Date: Tue, 10 Jan 2017 10:59:29 +0000 Subject: [PATCH 3/3] Clarify that requests are sent serially to the custom adapter --- docs/custom-transfers.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/custom-transfers.md b/docs/custom-transfers.md index b9c36c2d..3b2d2824 100644 --- a/docs/custom-transfers.md +++ b/docs/custom-transfers.md @@ -129,8 +129,10 @@ Or if there was an error: #### Stage 2: 0..N Transfers -After the initiation exchange, git-lfs will send any number of transfer -requests to the stdin of the transfer process. +After the initiation exchange, git-lfs will send any number of transfer +requests to the stdin of the transfer process, in a serial sequence. Once a +transfer request is sent to the process, it awaits a completion response before +sending the next request. ##### Uploads