summaryrefslogtreecommitdiff
path: root/Remote/Git.hs
Commit message (Collapse)AuthorAge
* suppress "(Recording state in git)" message when committing change to remote ↵Gravatar Joey Hess2012-05-20
| | | | | | | | | | | | | | | state This was shown redundantly for a tricky reason -- while it runs inside a doSideAction block that would appear to supress it, the action being run is in a different state monad; for the remote, and so the suppression doesn't work. Always suppressing the message when committing to a local remote is ok do to though -- it mirrors the /dev/nulling of the git annex shell commit output. And it turns out that any time there is a git-annex branch state change to commit on the remote, the local repo has also had a similar change made, and so the message has been shown already.
* Add support for core.worktree, and fix support for GIT_WORK_TREE and GIT_DIR.Gravatar Joey Hess2012-05-18
| | | | | | | The environment needs to override git-config. Changed when git config is read, and avoid rereading it once it's been read. chdir for both worktree settings.
* Add annex.httpheaders and annex.httpheader-command config settingsGravatar Joey Hess2012-04-22
| | | | | | Allow custom headers to be sent with all HTTP requests. (Requested by the Internet Archive)
* in which I discover voidGravatar Joey Hess2012-04-21
| | | | void :: Functor f => f a -> f () -- ah, of course that's useful :)
* rationalize getConfigGravatar Joey Hess2012-03-22
| | | | | | | | | | getConfig got a remote-specific config, and this confusing name caused it to be used a couple of places that only were interested in global configs. Rename to getRemoteConfig and make getConfig only get global configs. There are no behavior changes here, but remote.<name>.annex-web-options never actually worked (and per-remote web options is a very unlikely to be useful case so I didn't make it work), so fix the documentation for it.
* fun with symbolsGravatar Joey Hess2012-03-17
| | | | | | Nothing at all on hackage is using <&&> or <||>. (Also, <&&> should short-circuit on failure.)
* nukes another 15 lines thanks to ifMGravatar Joey Hess2012-03-15
|
* Work around a bug in rsync (IMHO) introduced by openSUSE's SIP patch.Gravatar Joey Hess2012-03-12
| | | | | | | | | | | | | | | | | | | | | | | | | openSUSE patches rsync with a patch adding SIP protocol support. https://gist.github.com/2026167 With this patch, running rsync with no hostname parameter is apparently supposed to list SIP hosts on the network. Practically, it does nothing and exits 0. git-annex uses rsync in a very special way to allow git-annex-shell to be run on the remote host, and so did not need to specify a hostname, or a file to transfer as a rsync parameter. So it sent ":", a degenerate case of "host:file". But the patch cannot differentiate ":" with no host parameter (a bug in the SIP patch surely). Results were that getting files failed, as rsync seemed to succeed, but the requested file failed to arrive. Also I think that sending files will make git-annex think a file has been transferred to the remote when really rsync does nothing. The workaround for this buggy rsync patch is to use "dummy:" as the hostname.
* do a cleanup commit after moving data from or to a git remoteGravatar Joey Hess2012-02-25
| | | | | | | | Added Annex.cleanup, which is a general purpose interface for adding actions to run at the end. Remotes with the old git-annex-shell will commit every time, and have no commit command, so hide stderr when running the commit command.
* whereis: Prints the urls of files that the web special remote knows about.Gravatar Joey Hess2012-02-14
|
* When checking that an url has a key, verify that the Content-Length, if ↵Gravatar Joey Hess2012-02-10
| | | | | | | | available, matches the size of the key. If there's no Content-Length, or the key has no size, this check is not done, but it should happen most of the time, and protect against web content that has changed.
* faster local-local droppingGravatar Joey Hess2012-01-28
| | | | | | Dropping a key from a local remote ran git-annex-shell unnecessarily. Now git-annex-shell is never used when acting on a local remote.
* Avoid repeated location log commits when a remote is receiving files.Gravatar Joey Hess2012-01-28
| | | | | | | | | Done by adding a oneshot mode, in which location log changes are written to the journal, but not committed. Taking advantage of git-annex's existing ability to recover in this situation. This is used by git-annex-shell and other places where changes are made to a remote's location log.
* fsck --from remote --fastGravatar Joey Hess2012-01-20
| | | | | | | Avoids expensive file transfers, at the expense of checking file size and/or contents. Required some reworking of the remote code.
* optimise fsck --from normal git remotesGravatar Joey Hess2012-01-19
| | | | | | | | | | For a local git remote, can symlink the file. For a git remote using rsync, can preseed any local content. There are a few reasons to use fsck --from on a normal git remote. One is if it's using gitosis or similar, and you don't have shell access to run git annex locally. Another reason could be if you just want to fsck certian files of a bare remote.
* add tmp flag parameter to retrieveKeyFileGravatar Joey Hess2012-01-19
|
* reorgGravatar Joey Hess2012-01-10
|
* after is a better name for observe_Gravatar Joey Hess2012-01-03
|
* factor observe_Gravatar Joey Hess2012-01-03
|
* Added remote.name.annex-web-options configuration setting, which can be used ↵Gravatar Joey Hess2012-01-02
| | | | to provide parameters to whichever of wget or curl git-annex uses (depends on which is available, but most of their important options suitable for use here are the same).
* skip local remotes that are not available (ie, not mounted)Gravatar Joey Hess2011-12-31
| | | | | | | With --fast, unavailable local remotes are filtered out of the fast set. This way, if there are local remotes, --fast always acts only on them, and if none are mounted, acts on nothing. This consistency is better than --fast acting on different remotes depending on what's mounted.
* type alias cleanupGravatar Joey Hess2011-12-31
|
* better filtering out of special remotesGravatar Joey Hess2011-12-31
|
* Properly handle multiline git config values.Gravatar Joey Hess2011-12-15
| | | | | | | | | | A crash on parsing was fixed a while ago. This adds support for fully correctly parsing multiline git config values, using git config --null. Since git-annex-shell configlist uses normal git config output, I left in support for that too; the two forms of config output can be easily identified by the parser. Since configlist only prints the annex.uuid config, there's no risk of multiline values there, so no need to change it.
* split out Git/Command.hsGravatar Joey Hess2011-12-14
|
* split more stuff out of Git.hsGravatar Joey Hess2011-12-14
|
* split out three modules from GitGravatar Joey Hess2011-12-13
| | | | | Constructors and configuration make sense in separate modules. A separate Git.Types is needed to avoid cycles.
* split out Annex/BranchState.hsGravatar Joey Hess2011-12-12
|
* optimiationGravatar Joey Hess2011-12-12
| | | | avoids reading the config of a local remote twice in a row
* ensure local remote is initialized when copying to itGravatar Joey Hess2011-12-10
| | | | | | | | | | | | | | | | | Needed due to this scenario: Bare repo origin is made, foo is cloned from it; foo is initalized; a file is added to foo's annex; git annex move --to origin Since the git-annex branch has not yet been pushed to origin, it doesn't auto-initialize. When the content is sent to it, it's stored, but the remote has NoUUID, and so nothing is logged in the location log. Then the content is removed from the local repo, and git-annex has lost track of it. git annex fsck in origin will find the lost content, but let's not let this happen. Content should only be sent to initalized remotes. This cannot happen for non-local remotes, since git-annex-shell always checks that the repo is initialized.
* hslintGravatar Joey Hess2011-12-09
|
* factor out untilTrueGravatar Joey Hess2011-12-02
|
* add support for using hashDirLower in addition to hashDirMixedGravatar Joey Hess2011-11-28
| | | | | | | | | | Supporting multiple directory hash types will allow converting to a different one, without a flag day. gitAnnexLocation now checks which of the possible locations have a file. This means more statting of files. Several places currently use gitAnnexLocation and immediately check if the returned file exists; those need to be optimised.
* lintGravatar Joey Hess2011-11-11
|
* factored out some useful error catching methodsGravatar Joey Hess2011-11-10
|
* safer inannex checkingGravatar Joey Hess2011-11-09
| | | | | | | | git-annex-shell inannex now returns always 0, 1, or 100 (the last when it's unclear if content is currently in the index due to it currently being moved or dropped). (Actual locking code still not yet written.)
* reorder repo parameters lastGravatar Joey Hess2011-11-08
| | | | | | | | | | | | | Many functions took the repo as their first parameter. Changing it consistently to be the last parameter allows doing some useful things with currying, that reduce boilerplate. In particular, g <- gitRepo is almost never needed now, instead use inRepo to run an IO action in the repo, and fromRepo to get a value from the repo. This also provides more opportunities to use monadic and applicative combinators.
* add a UUID typeGravatar Joey Hess2011-11-07
| | | | Should have done this a long time ago.
* Don't try to read config from repos with annex-ignore set.Gravatar Joey Hess2011-11-07
|
* do commit location changes to remote in copy --toGravatar Joey Hess2011-10-27
| | | | | test suite pointed out that if a file was copied from B to A, and then A cloned, the clone ought to immediatly know it can get the file from A.
* reap in onLocalGravatar Joey Hess2011-10-27
| | | | Each onLocal call involves a new Annex state, so needs to clean up after it.
* improve config reading when operating on remote on same hostGravatar Joey Hess2011-10-27
| | | | | | | | | Before the config was read each time onLocal was called, and entirely redundantly since it's read for same-host remotes on startup. Also a minor bug fix: When rsyncing to a same-host remote, use the rsync-options from the repository that the user ran git-annex in, not those of the receiving repository.
* Sped up some operations on remotes that are on the same host.Gravatar Joey Hess2011-10-27
| | | | | | | | | | | | | | Specifically, disabled trying to update the git-annex branch on the remote, since that data is never used by operations that act on such remotes. Also, when copying content to such a remote, skip committing the presence information changes to its git-annex branch. Leaving it in the journal there is ok: Any command run on the remote that needs the info will flush the journal. This may partially solve this bug: http://git-annex.branchable.com/bugs/fails_to_handle_lot_of_files/ Although I still see unreaped git processes piling up when doing a copy --to.
* broke up UtilityGravatar Joey Hess2011-10-16
|
* clean Annex stuff out of Utility/Gravatar Joey Hess2011-10-16
|
* break out non-log stuff to separate moduleGravatar Joey Hess2011-10-15
|
* reorganize log modulesGravatar Joey Hess2011-10-15
| | | | no code changes
* A remote can have a annexUrl configured, that is used by git-annex instead ↵Gravatar Joey Hess2011-10-14
| | | | of its usual url. (Similar to pushUrl.)
* minor syntax changesGravatar Joey Hess2011-10-11
|
* renameGravatar Joey Hess2011-10-05
|