From 75b96059af00ed2a3e7934338bc3e2e278a4f817 Mon Sep 17 00:00:00 2001 From: Ilya_Shlyakhter Date: Thu, 9 Jul 2020 00:21:02 +0000 Subject: [PATCH 1/5] Added a comment: git-annex-cat --- .../comment_1_cc0b67a0bbf93841d5755a9b1dd74d36._comment | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 doc/todo/idea__58___git-annex_cat/comment_1_cc0b67a0bbf93841d5755a9b1dd74d36._comment diff --git a/doc/todo/idea__58___git-annex_cat/comment_1_cc0b67a0bbf93841d5755a9b1dd74d36._comment b/doc/todo/idea__58___git-annex_cat/comment_1_cc0b67a0bbf93841d5755a9b1dd74d36._comment new file mode 100644 index 0000000000..2ecf59bcc7 --- /dev/null +++ b/doc/todo/idea__58___git-annex_cat/comment_1_cc0b67a0bbf93841d5755a9b1dd74d36._comment @@ -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]] +"""]] From 96aad5458b520143cf9ce09664151027b9c777a9 Mon Sep 17 00:00:00 2001 From: Ilya_Shlyakhter Date: Thu, 9 Jul 2020 01:06:37 +0000 Subject: [PATCH 2/5] Added a comment: re: git-annex-cat --- ...omment_5_f78a6a136610f3fca7a02a3af9c19e25._comment | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 doc/todo/git-annex-cat/comment_5_f78a6a136610f3fca7a02a3af9c19e25._comment diff --git a/doc/todo/git-annex-cat/comment_5_f78a6a136610f3fca7a02a3af9c19e25._comment b/doc/todo/git-annex-cat/comment_5_f78a6a136610f3fca7a02a3af9c19e25._comment new file mode 100644 index 0000000000..8929fb4c5d --- /dev/null +++ b/doc/todo/git-annex-cat/comment_5_f78a6a136610f3fca7a02a3af9c19e25._comment @@ -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? + +"""]] From bbc38003690fde87a303827b38983592e65a2ca6 Mon Sep 17 00:00:00 2001 From: "branchable@bafd175a4b99afd6ed72501042e364ebd3e0c45e" Date: Thu, 9 Jul 2020 14:23:15 +0000 Subject: [PATCH 3/5] Added a comment: Update on my auto-commit / auto-sync scripts --- ..._195815446f3ec78901c1ddd245b86c4c._comment | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 doc/todo/wishlist__58___disable_automatic_commits/comment_6_195815446f3ec78901c1ddd245b86c4c._comment diff --git a/doc/todo/wishlist__58___disable_automatic_commits/comment_6_195815446f3ec78901c1ddd245b86c4c._comment b/doc/todo/wishlist__58___disable_automatic_commits/comment_6_195815446f3ec78901c1ddd245b86c4c._comment new file mode 100644 index 0000000000..811c6eec42 --- /dev/null +++ b/doc/todo/wishlist__58___disable_automatic_commits/comment_6_195815446f3ec78901c1ddd245b86c4c._comment @@ -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. +"""]] From b2581d4dd107ccefd0a3c1484fcf6bab49905361 Mon Sep 17 00:00:00 2001 From: "branchable@bafd175a4b99afd6ed72501042e364ebd3e0c45e" Date: Thu, 9 Jul 2020 14:24:48 +0000 Subject: [PATCH 4/5] Added a comment: I've moved my auto-sync-daemon script --- .../comment_3_e584a99e46f881358bf848131a94e293._comment | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 doc/forum/Can_the_assistant_sync_files_if_committed_manually___40__autocommit__61__false__41____63__/comment_3_e584a99e46f881358bf848131a94e293._comment diff --git a/doc/forum/Can_the_assistant_sync_files_if_committed_manually___40__autocommit__61__false__41____63__/comment_3_e584a99e46f881358bf848131a94e293._comment b/doc/forum/Can_the_assistant_sync_files_if_committed_manually___40__autocommit__61__false__41____63__/comment_3_e584a99e46f881358bf848131a94e293._comment new file mode 100644 index 0000000000..e0fa67fde9 --- /dev/null +++ b/doc/forum/Can_the_assistant_sync_files_if_committed_manually___40__autocommit__61__false__41____63__/comment_3_e584a99e46f881358bf848131a94e293._comment @@ -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). +"""]] From 59c90643cddc15f3d8137e311e8cca30b0706b76 Mon Sep 17 00:00:00 2001 From: barak Date: Fri, 10 Jul 2020 14:26:22 +0000 Subject: [PATCH 5/5] typo --- doc/special_remotes/git-lfs.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/special_remotes/git-lfs.mdwn b/doc/special_remotes/git-lfs.mdwn index 00e0d29405..1d5e8df0da 100644 --- a/doc/special_remotes/git-lfs.mdwn +++ b/doc/special_remotes/git-lfs.mdwn @@ -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: