CI to automate build of cargo lockfiles on different Alpine releases for git-annex aports https://gitlab.alpinelinux.org/alpine/aports/-/tree/master/community/git-annex
Find a file
Joey Hess 6ecd55a9fa
Fixed some other potential hangs in the P2P protocol
Finishes the start made in 983c9d5a53, by
handling the case where `transfer` fails for some other reason, and so the
ReadContent callback does not get run. I don't know of a case where
`transfer` does fail other than the locking dealt with in that commit, but
it's good to have a guarantee.

StoreContent and StoreContentTo had a similar problem.
Things like `getViaTmp` may decide not to run the transfer action.
And `transfer` could certianly fail, if another transfer of the same
object was in progress. (Or a different object when annex.pidlock is set.)

If the transfer action was not run, the content of the object would
not all get consumed, and so would get interpreted as protocol commands,
which would not go well.

My approach to fixing all of these things is to set a TVar only
once all the data in the transfer is known to have been read/written.
This way the internals of `transfer`, `getViaTmp` etc don't matter.

So in ReadContent, it checks if the transfer completed.
If not, as long as it didn't throw an exception, send empty and Invalid
data to the callback. On an exception the state of the protocol is unknown
so it has to raise ProtoFailureException and close the connection,
same as before.

In StoreContent, if the transfer did not complete
some portion of the DATA has been read, so the protocol is in an unknown
state and it has to close the conection as well.

(The ProtoFailureMessage used here matches the one in Annex.Transfer, which
is the most likely reason. Not ideal to duplicate it..)

StoreContent did not ever close the protocol connection before. So this is
a protocol change, but only in an exceptional circumstance, and it's not
going to break anything, because clients already need to deal with the
connection breaking at any point.

The way this new behavior looks (here origin has annex.pidlock = true so will
only accept one upload to it at a time):

git annex copy --to origin -J2
copy x (to origin...) ok
copy y (to origin...)
  Lost connection (fd:25: hGetChar: end of file)

This work is supported by the NIH-funded NICEMAN (ReproNim TR&D3) project.
2018-11-06 14:52:32 -04:00
Annex git-annex-shell: fix transfer hang 2018-11-06 13:00:37 -04:00
Assistant moved module and relicensed 2018-10-29 23:13:36 -04:00
Backend annex.maxextensionlength 2018-09-24 12:10:18 -04:00
Build remove old android app autobuild 2018-10-13 12:13:13 -04:00
CmdLine sync --content now supports --hide-missing adjusted branches 2018-10-19 17:51:25 -04:00
Command importfeed: Avoid erroring out when a feed has been repeatedly broken 2018-11-04 17:41:49 -04:00
Config fix syntax 2018-08-29 09:20:25 -04:00
Database remove unused import 2018-10-31 12:58:53 -04:00
debian debian: Current version breaks released versions of datalad 2018-11-05 11:36:47 -04:00
doc Fixed some other potential hangs in the P2P protocol 2018-11-06 14:52:32 -04:00
Git sync --content now supports --hide-missing adjusted branches 2018-10-19 17:51:25 -04:00
Limit AssociatedFile newtype 2017-03-10 13:35:31 -04:00
Logs moved module and relicensed 2018-10-29 23:13:36 -04:00
Messages removed the old Android app 2018-10-13 01:41:11 -04:00
P2P Fixed some other potential hangs in the P2P protocol 2018-11-06 14:52:32 -04:00
Remote webapp: Fixed a crash when adding a git remote. 2018-10-29 16:01:08 -04:00
RemoteDaemon instrument P2P --debug with connection and thread info 2018-10-22 15:52:11 -04:00
standalone remove android stuff 2018-11-04 20:06:49 -04:00
static Revert "remove newlines from static js and css" 2014-06-13 02:20:39 -04:00
templates removed the old Android app 2018-10-13 01:41:11 -04:00
Test Fix test suite failure when git-annex test is not run inside a git repository 2018-11-05 13:31:49 -04:00
Types v7 2018-10-25 18:24:23 -04:00
Upgrade v7 2018-10-25 18:24:23 -04:00
Utility fix comment 2018-11-06 11:42:31 -04:00
.ghci workaround for ghci fragility in reusing objects compiled with ghc 2012-10-20 16:20:42 -04:00
.gitattributes update changelog location 2016-08-22 23:54:11 -04:00
.gitignore removed the old Android app 2018-10-13 01:41:11 -04:00
.mailmap alias for Yaroslav @ yahoo to mailmap 2015-09-09 12:38:59 -04:00
Annex.hs refactor getCurrentBranch 2018-10-19 17:29:18 -04:00
Assistant.hs fold Build/SysConfig.hs into BuildInfo via include 2017-12-14 12:46:57 -04:00
Backend.hs more lambda-case conversion 2017-12-05 15:00:50 -04:00
bash-completion.bash update from optparse-applicative output 2017-06-09 11:30:24 -04:00
build.bat let build.bat also be run from cygwin terminal 2015-04-21 14:12:14 -04:00
BuildFlags.hs removed the old Android app 2018-10-13 01:41:11 -04:00
BuildInfo.hs Make Build/BuildVersion update embedded version number 2018-06-26 10:36:54 -04:00
CHANGELOG Fixed some other potential hangs in the P2P protocol 2018-11-06 14:52:32 -04:00
CmdLine.hs Make --json and --quiet suppress automatic init messages 2016-09-05 15:34:38 -04:00
Command.hs add --json-error-messages (not yet implemented) 2018-02-19 14:32:15 -04:00
Common.hs finally really add back custom-setup stanza 2017-12-31 16:36:39 -04:00
Config.hs centralized "yes"/"no" parsing 2018-10-10 11:14:27 -04:00
COPYRIGHT removed the old Android app 2018-10-13 01:41:11 -04:00
Creds.hs finish git-annex enable-tor 2016-11-29 17:30:27 -04:00
Crypto.hs add KeyVariety type 2017-02-24 15:16:56 -04:00
ghci avoid tab warnings from ghc 8 2016-11-17 13:39:30 -04:00
git-annex.cabal releasing package git-annex version 7.20181105 2018-11-05 13:33:36 -04:00
git-annex.hs windows build fix 2018-01-09 11:51:17 -04:00
git-union-merge.hs Always use filesystem encoding for all file and handle reads and writes. 2016-12-24 14:46:31 -04:00
Git.hs Propigate GIT_DIR and GIT_WORK_TREE environment to external special remotes. 2016-05-06 12:26:44 -04:00
Jenkinsfile Revert "debugging strange old version of git-annex in windows installer bundle" 2017-10-26 11:32:04 -04:00
Key.hs Fix mangling of --json output of utf-8 characters when not running in a utf-8 locale 2018-04-16 16:21:21 -04:00
Limit.hs Added --accessedwithin matching option. 2018-08-01 15:34:03 -04:00
Logs.hs dropdead per-remote metadata 2018-09-05 13:52:46 -04:00
Makefile removed the old Android app 2018-10-13 01:41:11 -04:00
Messages.hs v6: Fix database inconsistency 2018-10-16 13:51:37 -04:00
NEWS releasing package git-annex version 7.20181031 2018-10-31 15:46:57 -04:00
README use https 2014-11-06 14:20:10 -04:00
Remote.hs cache remotes via annex-speculate-present 2018-08-01 14:28:05 -04:00
Setup.hs Added git-remote-tor-annex, which allows git pull and push to the tor hidden service. 2016-11-21 17:27:38 -04:00
stack-windows.yaml remove old flags 2018-10-29 17:10:39 -04:00
stack.yaml removed the old Android app 2018-10-13 01:41:11 -04:00
Test.hs Fix test suite failure when git-annex test is not run inside a git repository 2018-11-05 13:31:49 -04:00
Types.hs better dup key with -J fix 2017-10-17 18:48:53 -04:00
Upgrade.hs fix upgrade of more than 1 version at a time 2018-10-26 14:31:13 -04:00

git-annex allows managing files with git, without checking the file
contents into git. While that may seem paradoxical, it is useful when
dealing with files larger than git can currently easily handle, whether due
to limitations in memory, checksumming time, or disk space.

For documentation, see doc/ or <https://git-annex.branchable.com/>