summaryrefslogtreecommitdiff
path: root/Git
Commit message (Collapse)AuthorAge
* 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.
* interface to parse git tree objectsGravatar Joey Hess2013-09-19
|
* 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.
* better probing for gcrypt repositories using new --check optionGravatar Joey Hess2013-09-19
| | | | | | | | Now can tell if a repo uses gcrypt or not, and whether it's decryptable with the current gpg keys. This closes the hole that undecryptable gcrypt repos could have before been combined into the repo in encrypted mode.
* webapp: support adding existing gcrypt special remotes from removable drivesGravatar Joey Hess2013-09-18
| | | | | | | | | | | | | | | | | | | | | | | When adding a removable drive, it's now detected if the drive contains a gcrypt special remote, and that's all handled nicely. This includes fetching the git-annex branch from the gcrypt repo in order to find out how to set up the special remote. Note that gcrypt repos that are not git-annex special remotes are not supported. It will attempt to detect such a gcrypt repo and refuse to use it. (But this is hard to do any may fail; see https://github.com/blake2-ppc/git-remote-gcrypt/issues/6) The problem with supporting regular gcrypt repos is that we don't know what the gcrypt.participants setting is intended to be for the repo. So even if we can decrypt it, if we push changes to it they might not be visible to other participants. Anyway, encrypted sneakernet (or mailnet) is now fully possible with the git-annex assistant! Assuming that the gpg key distribution is handled somehow, which the assistant doesn't yet help with. This commit was sponsored by Navishkar Rao.
* gcrypt: Ensure that signing key is set to one of the participants keys.Gravatar Joey Hess2013-09-17
| | | | | | Otherwise gcrypt will fail to pull, since it requires this to be the case. This needs a patched gcrypt, which is in my forked version.
* 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.
* partially complete gcrypt remote (local send done; rest not)Gravatar Joey Hess2013-09-07
| | | | | | | | | | | | | | | | | | | | | | | | This is a git-remote-gcrypt encrypted special remote. Only sending files in to the remote works, and only for local repositories. Most of the work so far has involved making initremote work. A particular problem is that remote setup in this case needs to generate its own uuid, derivied from the gcrypt-id. That required some larger changes in the code to support. For ssh remotes, this will probably just reuse Remote.Rsync's code, so should be easy enough. And for downloading from a web remote, I will need to factor out the part of Remote.Git that does that. One particular thing that will need work is supporting hot-swapping a local gcrypt remote. I think it needs to store the gcrypt-id in the git config of the local remote, so that it can check it every time, and compare with the cached annex-uuid for the remote. If there is a mismatch, it can change both the cached annex-uuid and the gcrypt-id. That should work, and I laid some groundwork for it by already reading the remote's config when it's local. (Also needed for other reasons.) This commit was sponsored by Daniel Callahan.
* add getParticipantListGravatar Joey Hess2013-09-05
| | | | | Note that it needs to look at global git config, since git-remote-gcrypt will see any setting there as a fallback.
* automatically derive an annex-uuid from a gcrypt-uuidsGravatar Joey Hess2013-09-05
|
* 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!
* Unused: bugfixGravatar guilhem2013-08-26
| | | | Detect staged files that are not in the working tree.
* Speed up the 'unused' command.Gravatar guilhem2013-08-25
| | | | | | | | | | | Instead of populating the second-level Bloom filter with every key referenced in every Git reference, consider only those which differ from what's referenced in the index. Incidentaly, unlike with its old behavior, staged modifications/deletion/... will now be detected by 'unused'. Credits to joeyh for the algorithm. :-)
* Unescape characters in 'file://...' URIs.Gravatar guilhem2013-08-22
| | | | | That allows, in Git remotes, such URIs to contain spaces or UTF-8 characters. Closes http://git-annex.branchable.com/bugs/Unable_to_use_remotes_with_space_in_the_path/ .
* unused: Pay attention to symlinks that are not yet staged in the index.Gravatar Joey Hess2013-08-22
|
* avoid more build 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!
* better git version checkingGravatar Joey Hess2013-08-02
|
* 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.
* Slow and ugly work around for bug #718517 in git, which broke git-cat-file ↵Gravatar Joey Hess2013-08-01
| | | | | | | | | | | | | --batch for filenames containing spaces. This runs git-cat-file in non-batch mode for all files with spaces. If a directory tree has a lot of them, and is in direct mode, even "git annex add" when there are few new files will need a *lot* of forks! The only reason buffering the whole file content to get the sha is not a memory leak is that git-annex only ever uses this on symlinks. This needs to be reverted as soon as a fix is available in git!
* Escape ':' in file/directory names to avoid it being treated as a pathspec ↵Gravatar Joey Hess2013-08-01
| | | | | | | | | | | | | | | | | | | | | | | by some git commands A git pathspec is a filename, except when it starts with ':', it's taken to refer to a branch, etc. Rather than special case ':', any filename starting with anything unusual is prefixed with "./" This could have been a real mess to deal with, but luckily SafeCommand is already extensively used and so we know at the type level the difference between parameters that are files, and parameters that are command options. Testing did show that Git.Queue was not using SafeCommand on filenames fed to xargs. (Filenames starting with '-' worked before only because -- was used to separate filenames from options when calling eg git add.) The test suite now passes with filenames starting with ':'. However, I did not keep that change to it, because such filenames are probably not legal on windows, and I have enough ugly windows ifdefs in there as it is. This commit was sponsored by Otavio Salvador. Thanks!
* importfeed: git-annex becomes a podcatcher in 150 LOCGravatar Joey Hess2013-07-28
|
* avoid newline translation when writing to git hash-objectGravatar Joey Hess2013-06-18
| | | | They're like mushrooms, just keep popping up.
* missed another hash-object call, disable filtering there tooGravatar Joey Hess2013-06-18
|
* avoid filtering object being hashedGravatar Joey Hess2013-06-18
| | | | This avoids newline conversion being done on it in Windows.
* Revert "flush stream after each write to update-index, to possibly avoid ↵Gravatar Joey Hess2013-06-14
| | | | | | buffering issues on Windows" Didn't help.
* flush stream after each write to update-index, to possibly avoid buffering ↵Gravatar Joey Hess2013-06-14
| | | | issues on Windows
* Can now restart certain long-running git processes if they crash, and ↵Gravatar Joey Hess2013-05-31
| | | | | | | | | | | | | | | | | | | continue working. Fuzz tests have shown that git cat-file --batch sometimes stops running. It's not yet known why (no error message; repo seems ok). But this is something we can deal with in the CoProcess framework, since all 3 types of long-running git processes should be restartable if they fail. Note that, as implemented, only IO errors are caught. So an error thrown by the reveiver, when it sees something that is not valid output from git cat-file (etc) will not cause a restart. I don't want it to retry if git commands change their output or are just outputting garbage. This does mean that if the command did a partial output and crashed in the middle, it would still not be restarted. There is currently no guard against restarting a command repeatedly, if, for example, it crashes repeatedly on startup.
* include HEAD in CanPush shasGravatar Joey Hess2013-05-21
|
* 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.
* fix windows buildGravatar Joey Hess2013-05-21
|
* fix warningGravatar Joey Hess2013-05-20
|
* fix the day's Windows permissions damageGravatar Joey Hess2013-05-14
|
* fill in a few windows stubsGravatar Joey Hess2013-05-14
|
* typoGravatar Joey Hess2013-05-14
|
* more leaning toothpick fixesGravatar Joey Hess2013-05-14
|
* Merge branch 'master' into windowsGravatar Joey Hess2013-05-14
|\ | | | | | | | | | | | | | | Conflicts: Annex/Environment.hs Build/Configure.hs Git/Construct.hs Utility/FileMode.hs
| * detect local urls on DOSGravatar Joey Hess2013-05-14
| |
* | fix the day's windows permissions damageGravatar Joey Hess2013-05-12
| |
* | deal with git using / internally, even on DOSGravatar Joey Hess2013-05-12
| |
* | set raw mode for git check-attrGravatar Joey Hess2013-05-12
| |
* | fix permission damage (thanks, Windows)Gravatar Joey Hess2013-05-11
| |
* | refactoringGravatar Joey Hess2013-05-11
| |
* | use setCurrentDirectoryGravatar Joey Hess2013-05-11
| | | | | | | | On POSIX, this just calls changeWorkingDirectory.
* | clean up from windows portingGravatar Joey Hess2013-05-11
| |
* | git annex init works on Windows!Gravatar Joey Hess2013-05-11
| | | | | | | | git hash-object and cat-file both only use \n at ends of line, even on Windows.
* | catFile expects no \r, even on WindowsGravatar Joey Hess2013-05-11
| |
* | git-annex now builds on Windows (doesn't work)Gravatar Joey Hess2013-05-11
| |
* | fixup #if 0 stubs to use #ifndef mingw32_HOST_OSGravatar Joey Hess2013-05-10
| | | | | | | | | | | | That's needed in files used to build the configure program. For the other files, I'm keeping my __WINDOWS__ define, as I find that much easier to type. I may search and replace it to use the mingw32_HOST_OS thing later.
* | stub out POSIX stuffGravatar Joey Hess2013-05-10
|/