aboutsummaryrefslogtreecommitdiff
path: root/Annex/Content
Commit message (Collapse)AuthorAge
* Improve startup time for commands that do not operate on remotesGravatar Joey Hess2018-01-09
| | | | | | | | | | | | | | And for tab completion, by not unnessessarily statting paths to remotes, which used to cause eg, spin-up of removable drives. Got rid of the remotes member of Git.Repo. This was a bit painful. Remote.Git modifies the list of remotes as it reads their configs, so still need a persistent list of remotes. So, put it in as Annex.gitremotes. It's only populated by getGitRemotes, so commands like examinekey that don't care about remotes won't do so. This commit was sponsored by Jake Vosloo on Patreon.
* more core.sharedRepository perm fixesGravatar Joey Hess2018-01-04
| | | | | | | Fix more places where files in .git/annex/ were written with modes that did not take the core.sharedRepository config into account. This commit was sponsored by Jeff Goeke-Smith on Patreon.
* Always use filesystem encoding for all file and handle reads and writes.Gravatar Joey Hess2016-12-24
| | | | | This is a big scary change. I have convinced myself it should be safe. I hope!
* remove 163 lines of code without changing anything except importsGravatar Joey Hess2016-01-20
|
* wip v6 support for assistantGravatar Joey Hess2015-12-21
| | | | Files are not yet added to v6 repos in unlocked mode.
* moveGravatar Joey Hess2015-12-10
|
* add inode cache to the dbGravatar Joey Hess2015-12-09
| | | | | | | | | Renamed the db to keys, since it is various info about a Keys. Dropping a key will update its pointer files, as long as their content can be verified to be unmodified. This falls back to checksum verification, but I want it to use an InodeCache of the key, for speed. But, I have not made anything populate that cache yet.
* move InodeSentinal from direct mode code to its own moduleGravatar Joey Hess2015-12-09
| | | | | Will be used outside of direct mode for v6 unlocked files, and is already used outside of direct mode when adding files to annex.
* a few hlintsGravatar Joey Hess2015-04-11
|
* update my email address and homepage urlGravatar Joey Hess2015-01-21
|
* on second thought, InodeCache should use getFileSizeGravatar Joey Hess2015-01-20
| | | | | | | | This is necessary for interop between inode caches created on unix and windows. Which is more important than supporting inodecaches for large keys with the wrong size, which are broken anyway. There should be no slowdown from this change, except on Windows.
* revert parentDir changeGravatar Joey Hess2015-01-09
| | | | | | | | Reverts 2bba5bc22d049272d3328bfa6c452d3e2e50e86c Unfortunately, this caused breakage on Windows, and possibly elsewhere, because parentDir and takeDirectory do not behave the same when there is a trailing directory separator.
* Merge branch 'master' into relativepathsGravatar Joey Hess2015-01-06
|\ | | | | | | | | | | Conflicts: Locations.hs debian/changelog
| * made parentDir return a Maybe FilePath; removed most uses of itGravatar Joey Hess2015-01-06
| | | | | | | | | | | | | | | | parentDir is less safe than takeDirectory, especially when working with relative FilePaths. It's really only useful in loops that want to terminate at / This commit was sponsored by Audric SCHILTKNECHT.
* | Switch to using relative paths to the git repository.Gravatar Joey Hess2015-01-06
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | This allows the git repository to be moved while git-annex is running in it, with fewer problems. On Windows, this avoids some of the problems with the absurdly small MAX_PATH of 260 bytes. In particular, git-annex repositories should work in deeper/longer directory structures than before. See http://git-annex.branchable.com/bugs/__34__git-annex:_direct:_1_failed__34___on_Windows/ There are several possible ways this change could break git-annex: 1. If it changes its working directory while it's running, that would be Bad News. Good news everyone! git-annex never does so. It would also break thread safety, so all such things were stomped out long ago. 2. parentDir "." -> "" which is not a valid path. I had to fix one instace of this, and I should probably wipe all calls to parentDir out of the git-annex code base; it was never a good idea. 3. Things like relPathDirToFile require absolute input paths, and code assumes that the git repo path is absolute and passes it to it as-is. In the case of relPathDirToFile, I converted it to not make this assumption. Currently, the test suite has 16 failures.
* Revert "temporary debugging code for windows autobuilder test suite failure"Gravatar Joey Hess2014-12-30
| | | | This reverts commit 59956b117da3070cc0d66e997ff3b318fb6153d4.
* temporary debugging code for windows autobuilder test suite failureGravatar Joey Hess2014-12-30
|
* Do not preserve permissions and acls when copying files from one local git ↵Gravatar Joey Hess2014-08-26
| | | | | | | | | | | | | | | | | repository to another. Timestamps are still preserved as long as cp --preserve=timestamps is supported. This avoids cp -a overriding the default mode acls that the user might have set in a git repository. With GNU cp, this behavior change should not be a breaking change, because git-anex also uses rsync sometimes in the same situation, and has only ever preserved timestamps when using rsync. Systems without GNU cp will no longer use cp -a, but instead just cp. So, timestamps will no longer be preserved. Preserving timestamps when copying between repos is not guaranteed anyway. Closes: #729757
* finish fixing windows timezone madnessGravatar Joey Hess2014-06-12
| | | | | | | | | | | | | | | | | | | | | Rather than calculating the TSDelta once, and caching it, this now reads the inode sential file's InodeCache file once, and then each time a new InodeCache is generated, looks at the sentinal file to get the current delta. This way, if the time zone changes while git-annex is running, it will adapt. This adds some inneffiency, but only on Windows, and only 1 stat per new file added. The worst innefficiency is that `git annex status` and `git annex sync` will now (on Windows) stat the inode sentinal file once per file in the repo. It would be more efficient to use getCurrentTimeZone, rather than needing to stat the sentinal file. This should be easy to do, once the time package gets my bugfix patch. This commit was sponsored by Jürgen Lüters.
* fix for Windows file timestamp timezone madnessGravatar Joey Hess2014-06-12
| | | | | | | | | | | | | | | | | | | | | | On Windows, changing the time zone causes the apparent mtime of files to change. This confuses git-annex, which natually thinks this means the files have actually been modified (since THAT'S WHAT A MTIME IS FOR, BILL <sheesh>). Work around this stupidity, by using the inode sentinal file to detect if the timezone has changed, and calculate a TSDelta, which will be applied when generating InodeCaches. This should add no overhead at all on unix. Indeed, I sped up a few things slightly in the refactoring. Seems to basically work! But it has a big known problem: If the timezone changes while the assistant (or a long-running command) runs, it won't notice, since it only checks the inode cache once, and so will use the old delta for all new inode caches it generates for new files it's added. Which will result in them seeming changed the next time it runs. This commit was sponsored by Vincent Demeester.
* random hlint (to give the autobuilder something new to build)Gravatar Joey Hess2014-02-11
|
* fix failing test case on WindowsGravatar Joey Hess2014-02-03
| | | | ensure file being modified is all read before it's opened for write
* avoid using openFile when withFile can be usedGravatar Joey Hess2014-02-03
| | | | | | Potentially fixes some FD leak if an action on an opened file handle fails for some reason. There have been some hard to reproduce reports of git-annex leaking FDs, and this may solve them.
* factor out utility functionGravatar Joey Hess2014-02-03
|
* Direct mode .git/annex/objects directories are no longer left writableGravatar Joey Hess2013-11-15
| | | | | | | | | Because that allowed writing to symlinks of files that are not present, which followed the link and put bad content in an object location. fsck: Fix up .git/annex/object directory permissions. This commit was sponsored by an anonymous bitcoin donor.
* update for DiffTree type change (which fixes assistant in subdir confusion bug)Gravatar Joey Hess2013-10-17
|
* hlintGravatar Joey Hess2013-09-25
| | | | test suite still passes
* avoid failure creating inode sentinal fileGravatar Joey Hess2013-06-18
| | | | | | Test suite on windows failed running git annex init in a bare clone of an annexed repo. The annex directory didn't exist when it tried to write the inode sentinal file.
* assistant: In direct mode, objects are now only dropped when all associated ↵Gravatar Joey Hess2013-06-15
| | | | files are unwanted. This avoids a repreated drop/get loop of a file that has a copy in an archive directory, and a copy not in an archive directory. (Indirect mode still has some buggy behavior in this area, since it does not keep track of associated files.) Closes: #712060
* improve robustness of fromDirect and replaceFileGravatar Joey Hess2013-05-25
| | | | | | | | | Made fromDirect check that a file in the tree has good content (and is not a broken symlink either) before copying it to another file that has the same key. Made replaceFile clean up the temp file if the action that creates it, or the file replacement action fails.
* didn't quite get removeDirect right before, this passes test suiteGravatar Joey Hess2013-05-20
|
* store copy in inode cache tooGravatar Joey Hess2013-05-17
|
* test suite passes in direct modeGravatar Joey Hess2013-05-17
| | | | | | | | | | | This fixes a bug with git annex add in direct mode. If some files already existed in the tree pointing at the same key as a file that was just added, and their content was not present, add neglected to copy the content to those files. I also changed the behavior of moveAnnex slightly: When content is moved into the annex in direct mode, it does not overwrite any content already present in direct mode files. That content may be modified after all.
* fix the day's Windows permissions damageGravatar Joey Hess2013-05-14
|
* Merge branch 'windows' of git://git-annex.branchable.com into windowsGravatar Joey Hess2013-05-13
|\
* | read inode cache file strictly to avoid failure to drop on windowsGravatar Joey Hess2013-05-13
| | | | | | | | | | | | | | | | | | Seems that Windows doesn't allow deleting a file that the same process has open. Here the inode cache file was read and a the value from it gets used later. But due to laziness, the old file is still open when it gets deleted. Adding strictness avoids this problem. Of course, the file is small, so it's no problem to read it all strictly, so this is probably an improvement even outside of Windows.
| * rename moduleGravatar Joey Hess2013-05-12
|/
* fix permission damage (thanks, Windows)Gravatar Joey Hess2013-05-11
|
* clean up from windows portingGravatar Joey Hess2013-05-11
|
* git-annex now builds on Windows (doesn't work)Gravatar Joey Hess2013-05-11
|
* Bugfix: Direct mode no longer repeatedly checksums duplicated files.Gravatar Joey Hess2013-04-06
| | | | | | | | | | | | | | | | | Fixed by storing a list of cached inodes for a key, instead of just one. Backwards compatability note: An old git-annex version will fail to parse an inode cache file that has been written by a new version, and has multiple items. It will succees if just one. So old git-annexes will have even worse behavior when there are duplicated files, if that is possible. I don't think it will be a problem. (Famous last words.) Also, note that it doesn't expire old and unused inode caches for a key. It would be possible to add this if needed; just look through the associated files for a key and if there are more cached inodes, throw out any not corresponding to associated files. Unless a file is being copied repeatedly and the old copy deleted, this lack of expiry should not be a problem.
* Use lower case hash directories for storing files on crippled filesystems, ↵Gravatar Joey Hess2013-04-04
| | | | | | | | | | | | | | | same as is already done for bare repositories. * since this is a crippled filesystem anyway, git-annex doesn't use symlinks on it * so there's no reason to use the mixed case hash directories that we're stuck using to avoid breaking everyone's symlinks to the content * so we can do what is already done for all bare repos, and make non-bare repos on crippled filesystems use the all-lower case hash directories * which are, happily, all 3 letters long, so they cannot conflict with mixed case hash directories * so I was able to 100% fix this and even resuming `git annex add` in the test case will recover and it will all just work.
* hlintGravatar Joey Hess2013-04-03
|
* remove old debug printGravatar Joey Hess2013-03-16
|
* Bugfix: Fix bug in inode cache sentinal check, which broke copying to local ↵Gravatar Joey Hess2013-03-12
| | | | repos if the repo being copied from had moved to a different filesystem or otherwise changed all its inodes'
* detect renames during commit, and .. um, do nothing special because it's ↵Gravatar Joey Hess2013-03-11
| | | | | | lunch time But I'm well set up to fast-track direct mode adds for renames now.
* remove Eq instance for InodeCacheGravatar Joey Hess2013-03-11
| | | | | | | | | There are two types of equality here, and which one is right varies, so this forces me to consider and choose between them. Based on this, I learned that the commit in git anex sync was always doing a strong comparison, even when in a repository where the inodes had changed. Fixed that.
* remove debug printGravatar Joey Hess2013-02-23
|
* fix inverted logicGravatar Joey Hess2013-02-22
|
* fix sameInodeCache to check the inode change sentinalGravatar Joey Hess2013-02-22
| | | | | This should fix the problem where the assistant, on Android, re-adds every file on startup.