move a comment that is a bug report
authorJoey Hess <joeyh@joeyh.name>
Tue, 21 Nov 2023 19:57:10 +0000 (15:57 -0400)
committerJoey Hess <joeyh@joeyh.name>
Tue, 21 Nov 2023 19:57:10 +0000 (15:57 -0400)
doc/bugs/uninit_fails_when_I_symlink_your_symlink.mdwn [new file with mode: 0644]
doc/bugs/uninit_fails_when_I_symlink_your_symlink/comment_5_3fe7520813dee36ffb5419ed70ea43b5._comment [new file with mode: 0644]
doc/bugs/uninit_fails_when_I_symlink_your_symlink/comment_6_3afdea4f3705a9cfaa971ed3aa9f114c._comment [new file with mode: 0644]
doc/git-annex-uninit/comment_4_3386d8419830354b4422d38448467e95._comment [new file with mode: 0644]
doc/git-annex-uninit/comment_4_7d18fc21b563fb2776562809465015c7._comment [deleted file]
doc/git-annex-uninit/comment_5_3fe7520813dee36ffb5419ed70ea43b5._comment [deleted file]
doc/git-annex-uninit/comment_6_3afdea4f3705a9cfaa971ed3aa9f114c._comment [deleted file]

diff --git a/doc/bugs/uninit_fails_when_I_symlink_your_symlink.mdwn b/doc/bugs/uninit_fails_when_I_symlink_your_symlink.mdwn
new file mode 100644 (file)
index 0000000..dc32996
--- /dev/null
@@ -0,0 +1,37 @@
+```
+$ 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!
diff --git a/doc/bugs/uninit_fails_when_I_symlink_your_symlink/comment_5_3fe7520813dee36ffb5419ed70ea43b5._comment b/doc/bugs/uninit_fails_when_I_symlink_your_symlink/comment_5_3fe7520813dee36ffb5419ed70ea43b5._comment
new file mode 100644 (file)
index 0000000..7514aa5
--- /dev/null
@@ -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. 🙂
+"""]]
diff --git a/doc/bugs/uninit_fails_when_I_symlink_your_symlink/comment_6_3afdea4f3705a9cfaa971ed3aa9f114c._comment b/doc/bugs/uninit_fails_when_I_symlink_your_symlink/comment_6_3afdea4f3705a9cfaa971ed3aa9f114c._comment
new file mode 100644 (file)
index 0000000..d1109eb
--- /dev/null
@@ -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&rsquo;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!
+
+"""]]
diff --git a/doc/git-annex-uninit/comment_4_3386d8419830354b4422d38448467e95._comment b/doc/git-annex-uninit/comment_4_3386d8419830354b4422d38448467e95._comment
new file mode 100644 (file)
index 0000000..a99f5f4
--- /dev/null
@@ -0,0 +1,9 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 4"""
+ date="2023-11-21T19:56:32Z"
+ content="""
+Moved some comments about a bug to 
+[[bugs/uninit_fails_when_I_symlink_your_symlink]]. 
+Please do not use this man page's comment section to file bug reports.
+"""]]
diff --git a/doc/git-annex-uninit/comment_4_7d18fc21b563fb2776562809465015c7._comment b/doc/git-annex-uninit/comment_4_7d18fc21b563fb2776562809465015c7._comment
deleted file mode 100644 (file)
index b41dd08..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-[[!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!
-"""]]
diff --git a/doc/git-annex-uninit/comment_5_3fe7520813dee36ffb5419ed70ea43b5._comment b/doc/git-annex-uninit/comment_5_3fe7520813dee36ffb5419ed70ea43b5._comment
deleted file mode 100644 (file)
index 7514aa5..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-[[!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. 🙂
-"""]]
diff --git a/doc/git-annex-uninit/comment_6_3afdea4f3705a9cfaa971ed3aa9f114c._comment b/doc/git-annex-uninit/comment_6_3afdea4f3705a9cfaa971ed3aa9f114c._comment
deleted file mode 100644 (file)
index d1109eb..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-[[!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&rsquo;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!
-
-"""]]