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

This commit is contained in:
Joey Hess 2025-02-21 15:31:20 -04:00
commit 4c032655c2
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
5 changed files with 107 additions and 0 deletions

View file

@ -0,0 +1,8 @@
[[!comment format=mdwn
username="lell"
avatar="http://cdn.libravatar.org/avatar/4c4138a71d069e290240a3a12367fabe"
subject="comment 1"
date="2025-02-20T11:00:05Z"
content="""
It could be that the problem occurs if 0-byte files are annexed in unlocked form. At least all files in the strace output are 0 bytes long and the problem goes away when these are added to git and not git annex....
"""]]

View file

@ -0,0 +1,65 @@
### Please describe the problem.
In the context of exploring [solution for drawing a map of the clones](https://github.com/con/ceptualization/issues/1) I was reminded about `annex map` which I actually forgot about even if knew.
Immediate attempt to try on a local repo for the use case depicted in [aforementioned post](https://github.com/con/ceptualization/issues/1) I got an infinite loop of
```
map origin (sshing...)
ok
map origin (sshing...)
ok
...
```
where `origin` and related (bare) repo are
```
[remote "origin"]
url = sensored:/inbox/BIDS/Wager/Wager/1076_spacetop
fetch = +refs/heads/*:refs/remotes/origin/*
annex-uuid = 590b4fd0-0142-4e9d-8964-d1158c242c6a
[remote "rolando-exchange"]
url = sensored:/inbox/BIDS/Wager/Wager/1076_spacetop.git
annex-uuid = 40795e62-527c-4d26-ae8c-af42a6e2da5a
fetch = +refs/heads/*:refs/remotes/rolando-exchange/*
```
Rerunning with `--debug` showed that it seems to grow target path via referencing itself via `../1076_spacetop.git/` (
```
[2025-02-21 10:17:41.722571271] (Utility.Process) process [290220] read: ssh ["sensored","-S",".git/annex/ssh/sensored","-o","ControlMaster=auto","-o","ControlPersist=yes","-n","-T","sh -c 'if ! cd '\"'\"'/inbox/BIDS/Wager/Wager/1076_spacetop.git/../1076_spacetop.git/../1076_spacetop.git/../1076_spacetop.git/../1076_spacetop.git/../1076_spacetop.git/../1076_spacetop.git/../1076_spacetop.git/../1076_spacetop.git/../1076_spacetop.git/../1076_spacetop.git/../1076_spacetop.git/../1076_spacetop.git/../1076_spacetop.git/../1076_spacetop.git/../1076_spacetop.git'\"'\"' 2>/dev/null; then cd '\"'\"'/inbox/BIDS/Wager/Wager/1076_spacetop.git/../1076_spacetop.git/../1076_spacetop.git/../1076_spacetop.git/../1076_spacetop.git/../1076_spacetop.git/../1076_spacetop.git/../1076_spacetop.git/../1076_spacetop.git/../1076_spacetop.git/../1076_spacetop.git/../1076_spacetop.git/../1076_spacetop.git/../1076_spacetop.git/../1076_spacetop.git/../1076_spacetop.git'\"'\"'.git; fi && git config --null --list'"]
```
and on `origin` remote I have
```
> git -C /inbox/BIDS/Wager/Wager/1076_spacetop/ remote show spacetop-rolando-exchange
* remote spacetop-rolando-exchange
Fetch URL: ../1076_spacetop.git/
Push URL: ../1076_spacetop.git/
HEAD branch: master
Remote branches:
deface-bidsonym-1 new (next fetch will store in remotes/spacetop-rolando-exchange)
git-annex tracked
master tracked
try-redo-intended new (next fetch will store in remotes/spacetop-rolando-exchange)
unredacted-master tracked
Local refs configured for 'git push':
git-annex pushes to git-annex (local out of date)
master pushes to master (local out of date)
```
### What steps will reproduce the problem?
run `git annex map` in my situation
### What version of git-annex are you using? On what operating system?
10.20241202
[[!meta author=yoh]]
[[!tag projects/openneuro]]

View file

@ -0,0 +1,14 @@
[[!comment format=mdwn
username="Spencer"
avatar="http://cdn.libravatar.org/avatar/2e0829f36a68480155e09d0883794a55"
subject="Confused"
date="2025-02-19T23:22:46Z"
content="""
I am confused by what you mean by \"keep the overview over a git annex repository\" and \"are complete locally\" (do you mean \"are completely local\"?)
It appears you are requesting an alternative representation of the working tree with folders collapsed if the locations for all contained annexed files are the same. However what that representation means is confusing: \"this folder (not file) has copies in these locations\". Folders are not synced across remotes: file content is. `annex list` is meant to see exactly what file content exists where and if that content is trusted (`X`) or untrusted (`x`). What if there are non-annexed files in that folder? The collapsed view almost seems to indicate that maybe these files exist in those locations, too.
This also does not appear to have much to do with `git annex info`.
If you are overwhelmed by the information density, time with the git-annex will help you understand why what it reports is important. Also if terminal history clutter adds to your information overwhelm, you can use `command | less` to use a terminal pager to help parse longer form information.
"""]]

View file

@ -0,0 +1,12 @@
[[!comment format=mdwn
username="Spencer"
avatar="http://cdn.libravatar.org/avatar/2e0829f36a68480155e09d0883794a55"
subject="For Those Who Stumble Here"
date="2025-02-19T23:08:41Z"
content="""
In my testing, I have found `git annex forget --drop-dead --force` problematic because if **ever** the two repositories speak to one another (thru e.g. fetch) again, the very alive remote for one marked dead in the other will be eradicated.
Luckily I've learned that **you don't have to fetch from one remote to another to still issue \"informed\" annex commands** which is critical. In other words, I didn't appreciate how annex learns of file content in remotes dynamically, I thought it was fairly dependent on merging in the `git-annex` branch to learn about files. Instead you can confidently treat `fetch`, `pull`, `push` commands as all *exclusively* for the merging of two sibling repos (and their histories, settings, remotes, etc).
For these kinds of (\"friend\"?) remotes (unrelated remotes), I think you'll want to remove the fetch refspec entirely and add `annex-sync=false` if you want to keep the relationship around, otherwise **never run `sync`** until you remove unrelated remotes.
"""]]

View file

@ -0,0 +1,8 @@
In the context of exploring [solution for drawing a map of the clones](https://github.com/con/ceptualization/issues/1) I was reminded about `annex map` which I actually forgot about even if knew.
I think that if there was a `--json` flag with help of which I could obtain a more readily machine accessible data (not graphviz custom format) -- I, or someone else, could provide alternative renderings (e.g. mermaid) or extend upon.
Please let me know on how feasible that would be, and any other thoughts you have in relation to the [aforementioned idea](https://github.com/con/ceptualization/issues/1) so I would know how to proceed.
[[!meta author=yoh]]
[[!tag projects/openneuro]]