Merge branch 'master' of ssh://git-annex.branchable.com
This commit is contained in:
commit
6b9d1c1317
5 changed files with 66 additions and 1 deletions
|
@ -0,0 +1,9 @@
|
|||
[[!comment format=mdwn
|
||||
username="branchable@bafd175a4b99afd6ed72501042e364ebd3e0c45e"
|
||||
nickname="branchable"
|
||||
avatar="http://cdn.libravatar.org/avatar/ae41dba34ee6000056f00793c695be75"
|
||||
subject="I've moved my auto-sync-daemon script"
|
||||
date="2020-07-09T14:24:48Z"
|
||||
content="""
|
||||
The script mentioned above now lives [here](https://github.com/aspiers/git-config/blob/master/bin/auto-sync-daemon).
|
||||
"""]]
|
|
@ -43,7 +43,7 @@ To encrypt your git pushes, you can use
|
|||
[git-remote-gcrypt](https://spwhitton.name/tech/code/git-remote-gcrypt/)
|
||||
and prefix the repository url with "gcrypt::"
|
||||
|
||||
To make git-annex encrypt the data it stores, you can use the encrption=
|
||||
To make git-annex encrypt the data it stores, you can use the encryption=
|
||||
configuration.
|
||||
|
||||
An example of combining the two:
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
[[!comment format=mdwn
|
||||
username="Ilya_Shlyakhter"
|
||||
avatar="http://cdn.libravatar.org/avatar/1647044369aa7747829c38b9dcc84df0"
|
||||
subject="re: git-annex-cat"
|
||||
date="2020-07-09T01:06:37Z"
|
||||
content="""
|
||||
\"There would need to be a separate API for streaming, which some remotes will not have any hope of supporting\" -- there could be a default implementation using the current protocol (`TRANSFER RETRIEVE` to tempfile then `cat` and `rm`), which some remotes could override with a true streaming implementation.
|
||||
|
||||
\"(1) some remotes would write to the named pipe; (2) some remotes would overwrite it with a file; (3) some remotes would open it, try to seek around as they do non-sequential recieves, and hang or something; (3) some remotes would maybe open and write to it, but would no longer be able to resume interrupted transfers, since they would I guess see its size as 0\" -- there could be a config flag to tell git-annex to assume that a given (legacy) remote does (1), at user's own risk. Am I wrong to think (1) holds for most legacy remotes?
|
||||
|
||||
"""]]
|
|
@ -0,0 +1,8 @@
|
|||
[[!comment format=mdwn
|
||||
username="Ilya_Shlyakhter"
|
||||
avatar="http://cdn.libravatar.org/avatar/1647044369aa7747829c38b9dcc84df0"
|
||||
subject="git-annex-cat"
|
||||
date="2020-07-09T00:21:02Z"
|
||||
content="""
|
||||
Related: [[todo/git-annex-cat]]
|
||||
"""]]
|
|
@ -0,0 +1,37 @@
|
|||
[[!comment format=mdwn
|
||||
username="branchable@bafd175a4b99afd6ed72501042e364ebd3e0c45e"
|
||||
nickname="branchable"
|
||||
avatar="http://cdn.libravatar.org/avatar/ae41dba34ee6000056f00793c695be75"
|
||||
subject="Update on my auto-commit / auto-sync scripts"
|
||||
date="2020-07-09T14:23:14Z"
|
||||
content="""
|
||||
I've moved the location of my [`git-auto-commit`](https://github.com/aspiers/git-config/blob/master/bin/git-auto-commit) and [`auto-commit-daemon` wrapper](https://github.com/aspiers/git-config/blob/master/bin/auto-commit-daemon), and [added support for autocommit policy](https://github.com/aspiers/git-config/commit/f1898f3c6476dd06b68ca35c79a0e95e4fb4b0cb) based an `autocommit` [git attribute](https://git-scm.com/docs/gitattributes).
|
||||
|
||||
For example:
|
||||
|
||||
$ echo \"*.org autocommit=min-age=+5m\" > .gitattributes
|
||||
|
||||
will ensure that all `.org` files last committed and modified more than 5 minutes ago will be automatically committed by the next `git auto-commit` run in this repo.
|
||||
|
||||
In the future I can imagine adding support for more sophisticated auto-commit policies.
|
||||
|
||||
Here's an example of the kind of systemd unit service file I put in `~/.config/systemd/user` so that I can control the daemon via `systemctl --user`:
|
||||
|
||||
```
|
||||
[Service]
|
||||
ExecStart=/bin/sh -c \"/home/adam/bin/auto-commit-daemon /home/adam/myrepo\"
|
||||
Restart=always
|
||||
NoNewPrivileges=true
|
||||
SyslogIdentifier=auto-commit-myrepo
|
||||
EnvironmentFile=/home/adam/myrepo/.autocommit
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
```
|
||||
|
||||
and `~/myrepo/.autocommit` contains `SLEEP=1m` so that the daemon wrapper runs `git auto-commit` every minute.
|
||||
|
||||
I couple this with another simple [`auto-sync-daemon` script](https://github.com/aspiers/git-config/blob/master/bin/auto-sync-daemon) which uses `inotifywait` to trigger invocations of `git annex sync` whenever `master` or `synced/master` change. Doing this across multiple remotes effectively achieves a poor man's [[assistant]]. (Incidentally, I use `mr`, one of Joey's other hacks, to [automatically set up and manage a systemd daemon for each repo](https://github.com/aspiers/mr-config/commit/80739c1e7f94423d588c4172e39508692d89f913)).
|
||||
|
||||
... **BUT**, I really wish this was supported natively in `git-annex` instead. I've kind of had to reinvent the base functionality of the assistant just to get this autocommit policy feature. It was painful, but still easier than learning Haskell and the `git-annex` codebase.
|
||||
"""]]
|
Loading…
Add table
Add a link
Reference in a new issue