summaryrefslogtreecommitdiff
path: root/Annex
Commit message (Collapse)AuthorAge
* hlintGravatar Joey Hess2013-09-25
| | | | test suite still passes
* completely solve catKey memory leakGravatar Joey Hess2013-09-19
| | | | | | | | | | | Since 4aaa584eb632a981f5364c844f9293d4cdedaa65 was incomplete, not being able to get the right mode of the file when the index differs from HEAD, this is a final workaround. Only buffering the start of the file in this case avoids leaking memory. This does not prevent git-cat-file being asked to output the whole file, which needs to be consumed, and can be slow. But this only happens in a rare edge case.
* more completely solve catKey memory leakGravatar Joey Hess2013-09-19
| | | | | | | | | | | | | | | | | | | Done using a mode witness, which ensures it's fixed everywhere. Fixing catFileKey was a bear, because git cat-file does not provide a nice way to query for the mode of a file and there is no other efficient way to do it. Oh, for libgit2.. Note that I am looking at tree objects from HEAD, rather than the index. Because I cat-file cannot show a tree object for the index. So this fix is technically incomplete. The only cases where it matters are: 1. A new large file has been directly staged in git, but not committed. 2. A file that was committed to HEAD as a symlink has been staged directly in the index. This could be fixed a lot better using libgit2.
* sync, pre-commit, indirect: Avoid unnecessarily catting non-symlink files ↵Gravatar Joey Hess2013-09-19
| | | | from git, which can be so large it runs out of memory.
* sync: Fix bug that caused direct mode mappings to not be updated when ↵Gravatar Joey Hess2013-09-13
| | | | merging files into the tree on Windows.
* automatically derive an annex-uuid from a gcrypt-uuidsGravatar Joey Hess2013-09-05
|
* avoid double commit during transitionGravatar Joey Hess2013-09-03
| | | | | | The second commit had some bad refs which resulted in the race detection code running. But that commit was unnecessary anyway, it only was there to merge in the other refs.
* Merge branch 'forget'Gravatar Joey Hess2013-09-03
|\ | | | | | | | | Conflicts: debian/changelog
* | Honor core.sharedrepository when receiving and adding files in direct mode.Gravatar Joey Hess2013-09-03
| |
| * forget --drop-dead: Completely removes mentions of repositories that have ↵Gravatar Joey Hess2013-08-31
| | | | | | | | | | | | | | | | | | | | | | | | | | been marked as dead from the git-annex branch. Wrote nice pure transition calculator, and ugly code to stage its results into the git-annex branch. Also had to split up several Log modules that Annex.Branch needed to use, but that themselves used Annex.Branch. The transition calculator is limited to looking at and changing one file at a time. While this made the implementation relatively easy, it precludes transitions that do stuff like deleting old url log files for keys that are being removed because they are no longer present anywhere.
| * remove printGravatar Joey Hess2013-08-29
| |
| * wordingGravatar Joey Hess2013-08-29
| |
| * sync, assistant: Force push of the git-annex branch.Gravatar Joey Hess2013-08-29
| | | | | | | | | | Necessary to ensure it gets pushed to remotes after being rewritten by forget. See inline rationalles for why I think this is safe!
| * use --force in taggedPushGravatar Joey Hess2013-08-29
| | | | | | | | | | This should make the assistant force update its tagged push branch after a transition like git annex forget.
| * Merge branch 'master' into forgetGravatar Joey Hess2013-08-29
| |\ | |/ |/|
* | typoGravatar Joey Hess2013-08-28
| |
| * add forget commandGravatar Joey Hess2013-08-28
| | | | | | | | | | | | | | | | | | Works, more or less. --dead is not implemented, and so far a new branch is made, but keys no longer present anywhere are not scrubbed. git annex sync fails to push the synced/git-annex branch after a forget, because it's not a fast-forward of the existing synced branch. Could be fixed by making git-annex sync use assistant-style sync branches.
| * untested transition detection on merging, and transition running codeGravatar Joey Hess2013-08-28
|/
* Youtube support! (And 53 other video hosts)Gravatar Joey Hess2013-08-22
| | | | | | | | | | When quvi is installed, git-annex addurl automatically uses it to detect when an page is a video, and downloads the video file. web special remote: Also support using quvi, for getting files, or checking if files exist in the web. This commit was sponsored by Mark Hepburn. Thanks!
* Fix bug that caused typechanged symlinks to be assumed to be unlocked files, ↵Gravatar Joey Hess2013-08-22
| | | | so they were added to the annex by the pre-commit hook.
* avoid more build warnings on WindowsGravatar Joey Hess2013-08-04
|
* squash compiler warnings on WindowsGravatar Joey Hess2013-08-04
|
* gitignore support for the assistant and watcherGravatar Joey Hess2013-08-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Requires git 1.8.4 or newer. When it's installed, a background git check-ignore process is run, and used to efficiently check ignores whenever a new file is added. Thanks to Adam Spiers, for getting the necessary support into git for this. A complication is what to do about files that are gitignored but have been checked into git anyway. git commands assume the ignore has been overridden in this case, and not need any more overriding to commit a changed version. However, for the assistant to do the same, it would have to run git ls-files to check if the ignored file is in git. This is somewhat expensive. Or it could use the running git-cat-file process to query the file that way, but that requires transferring the whole file content over a pipe, so it can be quite expensive too, for files that are not git-annex symlinks. Now imagine if the user knows that a file or directory tree will be getting frequent changes, and doesn't want the assistant to sync it, so gitignores it. The assistant could overload the system with repeated ls-files checks! So, I've decided that the assistant will not automatically commit changes to files that are gitignored. This is a tradeoff. Hopefully it won't be a problem to adjust .gitignore settings to not ignore files you want the assistant to autocommit, or to manually git annex add files that are listed in .gitignore. (This could be revisited if git-annex gets access to an interface to check the content of the index w/o forking a git command. This could be libgit2, or perhaps a separate git cat-file --batch-check process, so it wouldn't need to ship over the whole file content.) This commit was sponsored by Francois Marier. Thanks!
* get rid of __WINDOWS__, use mingw32_HOST_OSGravatar Joey Hess2013-08-02
| | | | | The latter is harder for me to remember, but avoids build failures in code used by the configure program.
* Fix a few bugs involving filenames that are at or near the filesystem's ↵Gravatar Joey Hess2013-07-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | maximum filename length limit. Started with a problem when running addurl on a really long url, because the whole url is munged into the filename. Ended up doing a fairly extensive review for places where filenames could get too large, although it's hard to say I'm not missed any.. Backend.Url had a 128 character limit, which is fine when the limit is 255, but not if it's a lot shorter on some systems. So check the pathconf() limit. Note that this could result in fromUrl creating different keys for the same url, if run on systems with different limits. I don't see this is likely to cause any problems. That can already happen when using addurl --fast, or if the content of an url changes. Both Command.AddUrl and Backend.Url assumed that urls don't contain a lot of multi-byte unicode, and would fail to truncate an url that did properly. A few places use a filename as the template to make a temp file. While that's nice in that the temp file name can be easily related back to the original filename, it could lead to `git annex add` failing to add a filename that was at or close to the maximum length. Note that in Command.Add.lockdown, the template is still derived from the filename, just with enough space left to turn it into a temp file. This is an important optimisation, because the assistant may lock down a bunch of files all at once, and using the same template for all of them would cause openTempFile to iterate through the same set of names, looking for an unused temp file. I'm not very happy with the relatedTemplate hack, but it avoids that slowdown. Backend.WORM does not limit the filename stored in the key. I have not tried to change that; so git annex add will fail on really long filenames when using the WORM backend. It seems better to preserve the invariant that a WORM key always contains the complete filename, since the filename is the only unique material in the key, other than mtime and size. Since nobody has complained about add failing (I think I saw it once?) on WORM, probably it's ok, or nobody but me uses it. There may be compatability problems if using git annex addurl --fast or the WORM backend on a system with the 255 limit and then trying to use that repo in a system with a smaller limit. I have not tried to deal with those. This commit was sponsored by Alexander Brem. Thanks!
* Fix inverted logic in last release's fix for data loss bug, that caused ↵Gravatar Joey Hess2013-07-30
| | | | git-annex sync on FAT or other crippled filesystems to add symlink standin files to the annex.
* importfeed: git-annex becomes a podcatcher in 150 LOCGravatar Joey Hess2013-07-28
|
* For long hostnames, use a hash of the hostname to generate the socket file ↵Gravatar Joey Hess2013-07-22
| | | | | | | | | | | for ssh connection caching. This is ok to do now that the socket filename never needs to be mapped back to a hostname. Short hostnames will still appear in the clear, which is less obfuscated. So this cannot possibly make ssh connection caching fail for a hostname it used to work for.
* stop cached ssh connection w/o needing to look up host and portGravatar Joey Hess2013-07-21
| | | | | | | | Turns out that with -O stop -S socketfile, ssh does not need the real hostname, or port to be specificed. This is because it simply talks to the ssh behind the socket and tells it to stop. So, can eliminate the conversion back from a socketfile to host and port. Which will allow using shorter filenames for sockets in the future.
* avoid false positives when detecting core.symlinks=false symlink standin filesGravatar Joey Hess2013-07-20
| | | | | | | | If the file is > 8192 bytes, it's certianly not a symlink file. And if it contains nuls or newlines or whitespace, it's certianly not a link to annexed content. But it might be a tarball containing a git-annex repo.
* avoid reading files that are not symlinks when core.symlinks=falseGravatar Joey Hess2013-07-20
| | | | | | This hack is only needed on FAT filesystems, so there's no point in doing it the rest of the time. And it's possible for there to be a false positive, so it's best to avoid the hack when possible.
* fix uninit to delete content from annex when it ended up hard linked back to ↵Gravatar Joey Hess2013-07-18
| | | | the work tree
* fsck: Don't claim to fix direct mode when run on a symlink whose content is ↵Gravatar Joey Hess2013-07-08
| | | | not present.
* detect system with no dot in FQDN, where git commit will fail, and workaroundGravatar Joey Hess2013-07-05
| | | | | Sigh, git is so *fragile*. Or rather, across the set of systems that use git-annex, where are no many horribly broken systems..
* moved AssociatedFile definitionGravatar Joey Hess2013-07-04
|
* 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.
* Revert "Windows: Ssh connection caching is now supported."Gravatar Joey Hess2013-06-17
| | | | | | Yeah, that didn't actually work. Got error messages like it couldn't read from the control socket, so probably ssh doesn't really support that on Windows, at least the cygwin ssh build I'm using.
* Windows: Ssh connection caching is now supported.Gravatar Joey Hess2013-06-17
| | | | Turns out the socket stuff just works on windows.
* avoid lazy read of file contentsGravatar Joey Hess2013-06-17
| | | | | | | On Windows, that means the file could still be open when later code wants to delete it, which fails. Since we're only reading 8k anyway, just read it, strictly. However, avoid reading the whole file strictly, so no getContentsStrict here.
* typo in commentGravatar Joey Hess2013-06-17
|
* 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
* avoid warnings when built with ghc 7.6Gravatar Joey Hess2013-06-02
|
* remove debug printGravatar Joey Hess2013-05-27
|
* Merge branch 'robustness'Gravatar Joey Hess2013-05-25
|\
| * make direct mode merge cleanup more robustGravatar Joey Hess2013-05-25
| | | | | | | | | | | | | | | | If the cleanup of a single file fails for some reason, continue to clean up other files. This could happen because of a race. The merge pulls in a change to a file, which gets changed locally at the same time.
| * 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.
* | assistant: Work around git-cat-file's not reloading the index after files ↵Gravatar Joey Hess2013-05-25
| | | | | | | | | | | | are staged. Argh.
* | refactorGravatar Joey Hess2013-05-24
|/
* XMPP: Avoid redundant and unncessary pushes. Note that this breaks ↵Gravatar Joey Hess2013-05-21
| | | | compatibility with previous versions of git-annex, which will refuse to accept any XMPP pushes from this version.
* update inode cache after copying contentGravatar Joey Hess2013-05-20
| | | | | | | This was also tripped by the test suite's automatic conflict resolution test. Which also shows BTW that an unnecessary copy of content is done sometimes when merging in direct mode. Not going to try to speed that up now.