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 51e60259e1
fix replaceFile makeAnnexLink race
replaceFile created a temp file, which was guaranteed to not overlap with
another temp file. However, makeAnnexLink then deleted that file, in
preparation for making the symlink in its place. This caused a race, since
some other replaceFile could create a temp file, using the same name!

I was able to reproduce the race easily running git-annex add -J10 in a
directory with 100 files (all with different contents). Some files would
get ingested into the annex, but their annex links would fail to be added.

There could be other situations where this same problem could occur.
Perhaps when the assistant is adding a file, if the user manually also ran
git-annex add. Perhaps in cases not involving adding a file.

The new replaceFile makes a temprary directory, which is guaranteed to be
unique, and doesn't make a temp file in there. makeAnnexLink can thus
create the symlink without problem and the race is avoided.

Audited all calls to replaceFile to make sure that the old behavior of
providing an empty temp file was not relied on.

The general problem of asking for a temp file and deleting it as part of
the process of using it could reach beyond replaceFile. Did some quick
audits and didn't find other cases of it. Probably only symlink creation
stuff would tend to make that mistake, mostly.
2015-11-06 15:08:19 -04:00
Annex fix replaceFile makeAnnexLink race 2015-11-06 15:08:19 -04:00
Assistant fix various build warnings, mostly on Windows 2015-10-13 13:24:44 -04:00
Backend use action, not sideAction 2015-10-11 13:29:44 -04:00
Build got logic backwards.. 2015-11-03 10:51:21 -04:00
CmdLine increase number of capabilities to match -Jn setting 2015-11-05 19:57:41 -04:00
Command missed adding allowConcurrentOutput here 2015-11-06 13:41:26 -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 more {-# OPTIONS_GHC -fno-warn-tabs #-} ... Forcing people who have what is merely a difference of opinion to you to do this is a bit of an asshole move. Just saying. 2015-05-10 16:38:49 -04:00
Database avoid ugly error about MVar if the sqlite worker thread crashes 2015-10-12 13:00:22 -04:00
debian fix replaceFile makeAnnexLink race 2015-11-06 15:08:19 -04:00
doc close 2015-11-06 13:52:47 -04:00
Git merge git command queue when joining with concurrent thread 2015-11-05 18:21:48 -04:00
Limit update my email address and homepage url 2015-01-21 12:50:09 -04:00
Logs Avoid unncessary write to the location log when a file is unlocked and then added back with unchanged content. 2015-10-12 14:46:47 -04:00
Messages Concurrent progress bars are now displayed when using -J with a command that moves file contents around. 2015-11-06 13:44:57 -04:00
Remote concurrent-output, first pass 2015-11-04 13:45:34 -04:00
RemoteDaemon rename bothHandles -> ioHandles 2015-04-03 15:35:18 -04:00
standalone remove verbose flag; aws deps fixed 2015-10-19 13:54:10 -04:00
static Revert "remove newlines from static js and css" 2014-06-13 02:20:39 -04:00
templates webapp: Remove the "disable remote" feature from the UI. 2015-09-21 13:05:44 -04:00
Types fix build w/o concurrent-output 2015-11-06 12:52:31 -04:00
Upgrade add import 2015-04-03 15:35:32 -04:00
Utility merge from propellor 2015-10-28 00:18:01 -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 cleanup makefile 2015-07-23 12:51:27 -04:00
.mailmap alias for Yaroslav @ yahoo to mailmap 2015-09-09 12:38:59 -04:00
Annex.hs arrange for regional output manager to run when -J is enabled 2015-11-04 16:22:43 -04:00
Assistant.hs unused import on windows 2015-04-20 11:27:47 -04:00
Backend.hs update my email address and homepage url 2015-01-21 12:50:09 -04:00
bash-completion.bash fix bash completion of filenames containing spaces 2015-07-20 11:17:35 -04:00
build.bat let build.bat also be run from cygwin terminal 2015-04-21 14:12:14 -04:00
BuildFlags.hs concurrent-output, first pass 2015-11-04 13:45:34 -04:00
CHANGELOG symlinks 2010-10-27 15:14:59 -04:00
Checks.hs update my email address and homepage url 2015-01-21 12:50:09 -04:00
CmdLine.hs arrange for regional output manager to run when -J is enabled 2015-11-04 16:22:43 -04:00
Command.hs join back threads before ending concurrent output so display works 2015-11-05 17:23:26 -04:00
Common.hs import Data.Default in Common 2015-01-28 16:11:28 -04:00
Config.hs refactor 2015-08-17 11:21:13 -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 support gpg.program 2015-09-09 18:06:49 -04:00
Crypto.hs support gpg.program 2015-09-09 18:06:49 -04:00
ghci brought back fast ghci 2013-02-27 21:38:01 -04:00
git-annex.cabal move dep on http-client to main dep list, since Utility.Url uses it 2015-11-06 12:54:23 -04:00
git-annex.hs wire tasty's option parser into the main program option parser 2015-07-13 13:20:10 -04:00
git-union-merge.hs update my email address and homepage url 2015-01-21 12:50:09 -04:00
Git.hs removed all uses of undefined from code base 2015-04-19 00:38:29 -04:00
INSTALL symlinks 2010-10-27 15:14:59 -04:00
Limit.hs Improve shutdown due to --time-limit, especially for fsck 2015-07-31 16:01:54 -04:00
Locations.hs optimise ObjectHashLower handling 2015-06-12 13:05:44 -04:00
Logs.hs rethought distributed fsck; instead add activity.log and expire command 2015-04-05 12:50:02 -04:00
Makefile speed up fast builds 2015-08-27 09:31:41 -07:00
Messages.hs concurrent-output, first pass 2015-11-04 13:45:34 -04:00
NEWS update NEWS 2012-01-19 15:27:39 -04:00
README use https 2014-11-06 14:20:10 -04:00
Remote.hs enableremote: List uuids and descriptions of remotes that can be enabled, and accept either the uuid or the description in leu if the name. 2015-10-26 14:55:40 -04:00
Setup.hs improve warning 2015-11-03 11:06:33 -04:00
stack.yaml put Win32-extras in extra-deps as it's not yet in lts 2015-10-13 12:34:01 -04:00
Test.hs add test cases for copy --auto 2015-10-06 17:35:29 -04:00
Types.hs update my email address and homepage url 2015-01-21 12:50:09 -04:00
Upgrade.hs update my email address and homepage url 2015-01-21 12:50:09 -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/>