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

This commit is contained in:
Joey Hess 2021-08-02 14:11:36 -04:00
commit 7334893d42
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
4 changed files with 90 additions and 0 deletions

View file

@ -0,0 +1,9 @@
[[!comment format=mdwn
username="jgsuess@732b8c62c50d8595d7b1d58eea11e5019c2308b1"
nickname="jgsuess"
avatar="http://cdn.libravatar.org/avatar/35a99d1b5df046b206807941ce9795d3"
subject="Also seeing this behaviour"
date="2021-08-02T06:14:41Z"
content="""
I also have this problem. Any advice?
"""]]

View file

@ -0,0 +1,61 @@
### Please describe the problem.
I guess it might be argued against, but I just spotted getting
```
lrwxrwxrwx 1 yoh yoh 186 Aug 2 12:44 .dot -> .git/annex/objects/k4/g9/SHA256E-s4--5ddbce254c08372e429a250112c6f4593868687ab01e9a126193e5a83560362b.dot/SHA256E-s4--5ddbce254c08372e429a250112c6f4593868687ab01e9a126193e5a83560362b.dot
```
so the entire filename of `.dot` upon `add --force-large` was considered to be an extension. I think it might be worthwhile to not consider leading `.` as belonging to extension?
checking on how we treat that case in datalad [in split_ext](https://github.com/datalad/datalad/blob/master/datalad/support/path.py#L84) -- apparently we are consistent with git-annex here:
```
$> python -c 'from datalad.support.path import split_ext; print(split_ext(".dot"))'
('', '.dot')
```
and we do not test for this case in tests, so not clear if omission was "conscious"
### What steps will reproduce the problem?
<details>
<summary>spotted on following "toy script" while exploring `drop --excludesamecontent=glob` functionality</summary>
```bash
#!/bin/bash
export PS4='> '
set -eu
cd "$(mktemp -d ${TMPDIR:-/tmp}/ann-XXXXXXX)"
set -x
git init
git annex init
mkdir -p d{1,2,3}
echo dot > .dot
echo 123 > d1/f1
cp .dot d1/same-as-dot
echo 124 > d1/unique
cp d1/f1 d2/same-as-in-d1
echo 125 > d2/unique
git annex add --force-large * .dot
git commit -m 'all initial' -a
git status
git annex list
git annex drop --force '--excludesamecontent=*' '--excludesamecontent=.*' d1
git annex list
```
</details>
### What version of git-annex are you using? On what operating system?
8.20210714+git68-g645b045e0-1~ndall+1
[[!meta author=yoh]]
[[!tag projects/datalad]]

View file

@ -0,0 +1,9 @@
I've been using git annex for the last few months and there are a lot of things I really like about it, but I continue to run into frustration after frustration and it is really hampering my experience with it. I'm not sure if the frustration is coming from my ignorance, inexperience, the fact I'm using it on a windows machine, or whether I have unrealistic expectations for it. Let me explain how I'm currently using it, and maybe people have suggestions on how I can make my experience more fluid.
Currently I have a several annex repos on my laptop and copies on two separate hard drives. Over the course of a week I'll add and refer to stuff in the annex repos on my laptop, and then once per week I'll sync the repos with my external hard drives and remove content from my laptop to free up space. Eventually, I'd like to write a script to handle the syncing process.
I continue to have issues. A few weeks ago I accidentally added large files straight into git and not knowing or understanding the documentation enough to remove them I eventually just removed and recloned the repo. To this week, being unable to sync my repos due to filenames that are too long. I know neither of these examples are really issues with annex itself, but they are issues which have come up while using annex which gives me bad mental associations with it.
I guess this is more venting frustration and looking for guidance rather than a specific question. I've read through much of the documentation, but do I need an understanding of the internals of git and git annex so when something goes wrong I know how to fix it? Where is a good place to start learning these? There have now been a couple issues around being on a windows machine, is it even worth using git annex on a windows machine? Do people have any tips on how I'm using git annex which may make my experience better, like a different workflow or something?
(I'm still having the filenames issue, which from what I can tell the only real solution is changing the name. If anyone knows a better solution it would be appreciated)

View file

@ -0,0 +1,11 @@
[[!comment format=mdwn
username="mattplasmastrike@59cb7d099c8665f6c7668d78d9f17db87cabc2fe"
nickname="mattplasmastrike"
avatar="http://cdn.libravatar.org/avatar/b700eeba98fedf3acb60d76ed1a6df40"
subject="comment 2"
date="2021-07-31T23:59:12Z"
content="""
- I was also affected by this and removing everything in the transfer folder \"rm -rf ./.git/annex/transfer/*\" on both devices fixed the issue for me.
- I sure I could have fixed this with a more surgical operation by selectively deleting files or maybe a command that I do not know
- although I am not sure what caused it I was canceling the progress with \"control c\"
"""]]