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

This commit is contained in:
Joey Hess 2023-03-17 16:49:48 -04:00
commit ffa4f2a995
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
3 changed files with 46 additions and 0 deletions

View file

@ -0,0 +1,14 @@
At one point, in two repositories, I added the `largefiles` options to my `.gitattributes` file:
```
* annex.backend=BLAKE2B512E annex.numcopies=2 annex.largefiles=largerthan=32kb
```
There were already Org-mode files in those repositories, kept under git. I used `git annex init` on those repositories long after those files had been under version control.
Since some these files were larger than 32k, it appears that after editing them, git-annex decided to alter the files so that the content in Git HEAD for each file is a pathname into the `objects` directory. That is, when I use `ls -l` the file is never a symlink, and yet if I use `git show HEAD:todo.org`, I see a pathname. Using `git annex unlock` on the file does nothing.
I decided to remove the `annex.largefiles` setting, since I don't want this behavior to be "automatic" anymore. So, in one of the two repositories, I ran `git annex unannex todo.org`, and then `git add`, and now I have a regular file back under version control again.
In the other repository, however, the file goes back to being a file path in the Git tree when I use "git add". Nothing that I do will add the file contents to Git rather than to the Annex, in this strange mode where it's never a symlink on disk, but it's definitely an Annex object file path in the Git tree.
How do I tell Annex to stop managing this particular file?

View file

@ -0,0 +1,24 @@
[[!comment format=mdwn
username="jwiegley"
avatar="http://cdn.libravatar.org/avatar/910fdec093deffebb92d7db019b5996a"
subject="An example of what I see"
date="2023-03-16T12:24:45Z"
content="""
Here's an example of what I see:
```
Hermes ~/kadena/docs $ w
## main
?? archive/
Hermes ~/kadena/docs $ git add archive
Hermes ~/kadena/docs $ git diff HEAD
diff --git c/archive/archive.org w/archive/archive.org
new file mode 100644
index 0000000..6cd5281
--- /dev/null
+++ w/archive/archive.org
@@ -0,0 +1 @@
+/annex/objects/BLAKE2B512E-s239446--66c363a36b5d1919344b41d947d6ee9c3db879e547fb7cfc5e94d09c16bdec>
```
Note that I discovered that I had both a `kadena.org` and an `archive/kadena.org`. Once I renamed the latter to `archive/archive.org`, then I was able to `git add` the first file without it being placed in the Annex, but I still cannot add `archive/archive.org` without it being put into the Annex as above.
"""]]

View file

@ -0,0 +1,8 @@
[[!comment format=mdwn
username="jwiegley"
avatar="http://cdn.libravatar.org/avatar/910fdec093deffebb92d7db019b5996a"
subject="comment 2"
date="2023-03-16T12:52:53Z"
content="""
Never mind, I found the answer on https://git-annex.branchable.com/git-annex-smudge/
"""]]