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 345ee4f37c Switch to MonadCatchIO-transformers for better handling of state while catching exceptions.
As seen in this bug report, the lifted exception handling using the StateT
monad throws away state changes when an action throws an exception.
http://git-annex.branchable.com/bugs/git_annex_fork_bombs_on_gpg_file/
  .. Which can result in cached values being redundantly calculated, or other
     possibly worse bugs when the annex state gets out of sync with reality.

This switches from a StateT AnnexState to a ReaderT (MVar AnnexState).
All changes to the state go via the MVar. So when an Annex action is
running inside an exception handler, and it makes some changes, they
immediately go into affect in the MVar. If it then throws an exception
(or even crashes its thread!), the state changes are still in effect.

The MonadCatchIO-transformers change is actually only incidental.
I could have kept on using lifted-base for the exception handling.
However, I'd have needed to write a new instance of MonadBaseControl
for the new monad.. and I didn't write the old instance.. I begged Bas
and he kindly sent it to me. Happily, MonadCatchIO-transformers is
able to derive a MonadCatchIO instance for my monad.

This is a deep level change. It passes the test suite! What could it break?

Well.. The most likely breakage would be to code that runs an Annex action
in an exception handler, and *wants* state changes to be thrown away.
Perhaps the state changes leaves the state inconsistent, or wrong. Since
there are relatively few places in git-annex that catch exceptions in the
Annex monad, and the AnnexState is generally just used to cache calculated
data, this is unlikely to be a problem.

Oh yeah, this change also makes Assistant.Types.ThreadedMonad a bit
redundant. It's now entirely possible to run concurrent Annex actions in
different threads, all sharing access to the same state! The ThreadedMonad
just adds some extra work on top of that, with its own MVar, and avoids
such actions possibly stepping on one-another's toes. I have not gotten
rid of it, but might try that later. Being able to run concurrent Annex
actions would simplify parts of the Assistant code.
2013-05-19 14:16:36 -04:00
Annex Switch to MonadCatchIO-transformers for better handling of state while catching exceptions. 2013-05-19 14:16:36 -04:00
Assistant Switch to MonadCatchIO-transformers for better handling of state while catching exceptions. 2013-05-19 14:16:36 -04:00
Backend fix permission damage (thanks, Windows) 2013-05-11 23:54:25 -04:00
Build syntax fix 2013-05-17 14:24:07 -04:00
Command Switch to MonadCatchIO-transformers for better handling of state while catching exceptions. 2013-05-19 14:16:36 -04:00
Common Use lower case hash directories for storing files on crippled filesystems, same as is already done for bare repositories. 2013-04-04 15:46:33 -04:00
Config rename module 2013-05-12 19:19:28 -04:00
debian Switch to MonadCatchIO-transformers for better handling of state while catching exceptions. 2013-05-19 14:16:36 -04:00
doc Switch to MonadCatchIO-transformers for better handling of state while catching exceptions. 2013-05-19 14:16:36 -04:00
Git fix the day's Windows permissions damage 2013-05-14 20:15:14 -04:00
GitAnnex Per-command usage messages. 2013-03-27 13:51:24 -04:00
Logs rename module 2013-05-12 19:19:28 -04:00
Messages hlint 2013-04-03 03:52:41 -04:00
Remote print encryption setup message before action 2013-05-18 19:36:55 -04:00
standalone ignore test suite failure until it has been gotten to work on windows 2013-05-17 19:59:54 -04:00
static animate syncing and other activity icons 2013-04-08 22:54:02 -04:00
templates add better documentation that pairing pairs all repositories configured to use the same jabber account 2013-05-16 20:21:47 -04:00
Types allow configuring the preferreddir 2013-04-26 13:01:06 -04:00
Upgrade rename module 2013-05-12 19:19:28 -04:00
Utility Switch to MonadCatchIO-transformers for better handling of state while catching exceptions. 2013-05-19 14:16:36 -04:00
.ghci workaround for ghci fragility in reusing objects compiled with ghc 2012-10-20 16:20:42 -04:00
.gitattributes decruft 2011-06-22 18:56:08 -04:00
.gitignore ignore *.o and *.hi, which are now all removed on clean 2013-04-14 16:58:15 -04:00
Annex.hs Switch to MonadCatchIO-transformers for better handling of state while catching exceptions. 2013-05-19 14:16:36 -04:00
Assistant.hs reomove showStart, unnecessary 2013-05-09 13:21:24 -04:00
Backend.hs hlint 2013-04-03 03:52:41 -04:00
BuildFlags.hs add build flags to version output 2013-03-09 14:57:23 -04:00
CHANGELOG symlinks 2010-10-27 15:14:59 -04:00
Checks.hs direct, indirect: Refuse to do anything when the assistant or git-annex watch daemon is running. 2013-04-22 16:41:46 -04:00
CmdLine.hs fix permission damage (thanks, Windows) 2013-05-11 23:54:25 -04:00
Command.hs drop --auto: Fix bug that prevented dropping files from untrusted repositories. 2013-04-01 15:20:42 -04:00
Common.hs fix the day's windows permissions damage 2013-05-12 19:09:48 -04:00
Config.hs split cost out into its own module 2013-03-13 16:30:34 -04:00
configure.hs Rewrote free disk space checking code 2012-03-22 17:32:47 -04:00
COPYRIGHT Add link COPYRIGHT -> debian/copyright; add COPYRIGHT to sdist. 2012-06-11 23:27:00 -07:00
Creds.hs fix permission damage (thanks, Windows) 2013-05-11 23:54:25 -04:00
Crypto.hs Generate ciphers with a better entropy. 2013-04-06 16:09:51 -04:00
Fields.hs safe recv-key in direct mode 2013-01-11 16:03:45 -04:00
ghci brought back fast ghci 2013-02-27 21:38:01 -04:00
git-annex.cabal Switch to MonadCatchIO-transformers for better handling of state while catching exceptions. 2013-05-19 14:16:36 -04:00
git-annex.hs try building test suite on windows 2013-05-17 16:45:44 -04:00
git-union-merge.hs factor out nukeFile 2012-06-06 13:13:13 -04:00
Git.hs fix permission damage (thanks, Windows) 2013-05-11 23:54:25 -04:00
GitAnnex.hs fix permission damage (thanks, Windows) 2013-05-11 23:54:25 -04:00
GitAnnexShell.hs fix permission damage (thanks, Windows) 2013-05-11 23:54:25 -04:00
Init.hs fix 2013-05-17 16:25:12 -04:00
INSTALL symlinks 2010-10-27 15:14:59 -04:00
Limit.hs fix permission damage (thanks, Windows) 2013-05-11 23:54:25 -04:00
Locations.hs fix the day's windows permissions damage 2013-05-12 19:09:48 -04:00
Makefile android build fix 2013-05-04 14:25:24 -04:00
Messages.hs show one alert when bulk adding files 2013-04-24 13:04:46 -04:00
NEWS update NEWS 2012-01-19 15:27:39 -04:00
Option.hs Per-command usage messages. 2013-03-27 13:51:24 -04:00
README add README 2011-05-13 19:20:54 -04:00
Remote.hs expose Control.Monad.join 2013-04-22 20:24:53 -04:00
Seek.hs fix permission damage (thanks, Windows) 2013-05-11 23:54:25 -04:00
Setup.hs split out library 2013-04-17 12:02:44 -04:00
Test.hs better message 2013-05-17 16:52:50 -04:00
Types.hs webapp: Progess bar fixes for many types of special remotes. 2013-03-28 17:04:37 -04:00
Upgrade.hs fix permission damage (thanks, Windows) 2013-05-11 23:54:25 -04:00
Usage.hs webapp: New --listen= option allows running the webapp on one computer and connecting to it from another. 2013-04-08 15:04:35 -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 <http://git-annex.branchable.com/>