Merge branch 'master' of ssh://git-annex.branchable.com

This commit is contained in:
Joey Hess 2023-11-20 12:29:44 -04:00
commit 70f7982ef8
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
12 changed files with 161 additions and 2 deletions

View file

@ -0,0 +1,12 @@
[[!comment format=mdwn
username="yarikoptic"
avatar="http://cdn.libravatar.org/avatar/f11e9c84cb18d26a1748c33b48c924b4"
subject="comment 5"
date="2023-11-18T01:35:35Z"
content="""
> (Or there could be a new option like git-annex copy --to bar --from foo --or-from-here)
or may be
`git-annex copy --to bar --from remote1 --or-from remote2 ...` or alike so there could be a sequence (in order of preference) of remotes? or better a general `git-annex copy --to bar --from-anywhere` so that `annex` first `get`'s it following current set costs etc if not present here, and then copies over.
"""]]

View file

@ -43,7 +43,7 @@ Possible reasons to make changes:
The mixed case hash directories have caused trouble on case-insensitive The mixed case hash directories have caused trouble on case-insensitive
filesystems, although that has mostly been papered over to avoid filesystems, although that has mostly been papered over to avoid
problems. One remaining problem users can stuble on occurs problems. One remaining problem users can stumble on occurs
when [[moving a repository from OSX to Linux|bugs/OSX_case_insensitive_filesystem]]. when [[moving a repository from OSX to Linux|bugs/OSX_case_insensitive_filesystem]].
* The hash directories, and also the per-key directories * The hash directories, and also the per-key directories

View file

@ -0,0 +1,45 @@
[[!comment format=mdwn
username="NewUser"
nickname="dont.post.me"
avatar="http://cdn.libravatar.org/avatar/90f59ddc341eaf9b2657422206c06901"
subject="`git annex uninit` fails when I symlink your symlink"
date="2023-11-20T04:22:02Z"
content="""
```
$ mkdir annex-test
$ cd annex-test/
$ git init
Initialized empty Git repository in /home/me/annex-test/.git/
$ git annex init
init (scanning for unlocked files...)
ok
(recording state in git...)
$ cat > .gitignore
*
$ cat > exampyle.txt
hello
$ git annex add --no-check-gitignore
add .gitignore (non-large file; adding content to git repository) ok
add exampyle.txt
ok
(recording state in git...)
$ git commit -m \"added\"
[master (root-commit) 2734615] added
2 files changed, 2 insertions(+)
create mode 100644 .gitignore
create mode 120000 exampyle.txt
$ ln -rs exampyle.txt what.foo
$ git status
On branch master
nothing to commit, working tree clean
$ git annex uninit
git-annex: what.foo points to annexed content, but is not checked into git.
Perhaps this was left behind by an interrupted git annex add?
Not continuing with uninit; either delete or git annex add the file and retry.
```
What should I do?
Honestly, I'm happy with git-annex so far, I'm just thinking that I need to re-init with `annex.tune.objecthashlower=true` because my other computer is windows.
Thanks!
"""]]

View file

@ -0,0 +1,24 @@
[[!comment format=mdwn
username="nobodyinperson"
avatar="http://cdn.libravatar.org/avatar/736a41cd4988ede057bae805d000f4f5"
subject="forgot to add the new ignored link + shortcoming of 'ln' command"
date="2023-11-20T10:25:52Z"
content="""
You forgot to add your (gitignore'd) `what.foo` to git. Another `git annex add --no-check-gitignore;git commit -m \"add link\"` will make the subsequent `git annex uninit` work properly. This is also what the error message says, btw.
But there's another problem underneath: Why is `what.foo` an annex-style symlink anyway? It should just point to `example.txt`, right?
```
🐟 ln -nrs example.txt what.foo
yann in yann-desktop-nixos in …/uninit-test on  main
🐟 ls -l
lrwxrwxrwx 186 yann users 20 Nov 11:08  example.txt -> .git/annex/objects/mK/4w/SHA256E-s6--5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03.txt/SHA256E-s6--5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03.txt
lrwxrwxrwx 186 yann users 20 Nov 11:08  what.foo -> .git/annex/objects/mK/4w/SHA256E-s6--5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03.txt/SHA256E-s6--5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03.txt
```
For some reason `ln` dereferences `example.txt` before linking, resulting in `what.foo` pointing to the same as `example.txt` -- not just to `example.txt` -- causing `what.foo` to look exactly like an annex link. I thought `-n` could fix this, but it would operate on the target `what.foo`, not the source `example.txt` 🤦. I couldn't make `ln` do this properly, except for renaming/removing `example.txt`, then `ln -rsf example.txt what.foo`, then restoring `example.txt`. Not viable. A better solution is `cp -s example.txt what.foo`. That will make `what.foo` point properly to just `example.txt` and not *its* target.
BTW you can still just `git add` things like normal non-annex symlinks like `what.foo`, no need for `git annex add` here.
Also, joey prefers to have bug reports/questions and the like in either [[todo]], [[bugs]] or [[forum]], because it's clear those are the places to look through for issues. Comments below random manpages are quick to be forgotten about. 🙂
"""]]

View file

@ -0,0 +1,18 @@
[[!comment format=mdwn
username="NewUser"
nickname="dont.post.me"
avatar="http://cdn.libravatar.org/avatar/90f59ddc341eaf9b2657422206c06901"
subject="comment 6"
date="2023-11-20T13:17:03Z"
content="""
Thank you for the illuminating comment!
> This is also what the error message says, btw.
Not continuing with uninit; either delete or git annex add the file and retry.
You’re right! I thought I only had a relative symlink pointing to the other symlink and not pointing into .git/annex/objects. It turns out that this is true for most of my symlinks but, just like you pointed out, some of them were pointing into .git/annex and the right thing to do there is to `add` them.
Also, thank you for pointing me towards todo/bugs/forum!
"""]]

View file

@ -10,7 +10,8 @@ git annex webapp
Opens a web app, that allows easy setup of a git-annex repository, Opens a web app, that allows easy setup of a git-annex repository,
and control of the git-annex assistant. If the assistant is not and control of the git-annex assistant. If the assistant is not
already running, it will be started. already running, it will be started. This will cause new files to
be added and syncing operations to be performed.
By default, the webapp can only be accessed from localhost, and running By default, the webapp can only be accessed from localhost, and running
it opens a browser window. it opens a browser window.

View file

@ -0,0 +1,12 @@
[[!comment format=mdwn
username="NewUser"
nickname="dont.post.me"
avatar="http://cdn.libravatar.org/avatar/90f59ddc341eaf9b2657422206c06901"
subject="launching `git annex webapp` starts adding to the annex which is surprising"
date="2023-11-18T20:03:06Z"
content="""
I have gotten as far as running `git init` and `git annex init` on my server. There’s a bunch of stuff there and I figure I’ll just add the things that I care about as I go.
I read the page on the [webapp](https://git-annex.branchable.com/git-annex-webapp/) and it just says that it “allows easy setup of a git-annex repository, and control of the git-annex assistant”. I started the webapp on my server and I was alarmed to see a message in the webapp that it was adding things to git annex. Over on the page for the [git annex assistant](https://git-annex.branchable.com/git-annex-assistant/) it says “By default, all new files in the directory will be added to the repository” which is definitely not what I expected. I’m a new user trying to learn how to use git annex and this was an unpleasant surprise. Can we amend the docs for the webapp to warn about this behavior?
"""]]

View file

@ -0,0 +1,9 @@
[[!comment format=mdwn
username="NewUser"
nickname="dont.post.me"
avatar="http://cdn.libravatar.org/avatar/90f59ddc341eaf9b2657422206c06901"
subject="launching `git annex webapp` starts adding to the annex which is surprising"
date="2023-11-18T20:08:17Z"
content="""
Since I panicked upon seeing a message about adding files to the annex, I promptly killed the webapp. I might just be misunderstanding what's going on. Thanks!
"""]]

View file

@ -0,0 +1,8 @@
[[!comment format=mdwn
username="nobodyinperson"
avatar="http://cdn.libravatar.org/avatar/736a41cd4988ede057bae805d000f4f5"
subject="comment 3"
date="2023-11-19T16:16:15Z"
content="""
Welcome on board. `git annex webapp` launches the assistant. It might even do `git annex assistant --autostart` and launch the assistant in all configured repos. That is indeed an important info to know. Everyone can edit these pages (the Edit button above) btw.
"""]]

View file

@ -0,0 +1,8 @@
[[!comment format=mdwn
username="nobodyinperson"
avatar="http://cdn.libravatar.org/avatar/736a41cd4988ede057bae805d000f4f5"
subject="comment 4"
date="2023-11-19T16:27:34Z"
content="""
I added a note to make it more clear that the webapp will sync stuff via the assistant.
"""]]

View file

@ -0,0 +1,9 @@
[[!comment format=mdwn
username="NewUser"
nickname="dont.post.me"
avatar="http://cdn.libravatar.org/avatar/90f59ddc341eaf9b2657422206c06901"
subject="Thanks Yann!"
date="2023-11-19T18:20:03Z"
content="""
Thank you [nobodyinperson](https://git-annex.branchable.com/users/nobodyinperson/)! Your note looks perfect. Oh, wow; I didn’t know that I could edit this page. Thanks again!
"""]]

View file

@ -0,0 +1,13 @@
[[!comment format=mdwn
username="NewUser"
nickname="dont.post.me"
avatar="http://cdn.libravatar.org/avatar/90f59ddc341eaf9b2657422206c06901"
subject="Is `annex.tune.objecthashlower=true` recommended for interop with windows?"
date="2023-11-20T04:24:35Z"
content="""
I've been adding stuff to git annex on my linux server and now I'm thinking that I need to uninit and re-init with `annex.tune.objecthashlower=true`. I'll want to use git-annex from windows as well.
Should I use `annex.tune.objecthashlower=true`? Also, what's the advice around the other tuning options `objecthash1` and `branchhash1`?
Thanks!
"""]]