File: keeps_trying_to_commit_file_unlocked.mdwn

package info (click to toggle)
git-annex 10.20250416-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 73,572 kB
  • sloc: haskell: 90,656; javascript: 9,103; sh: 1,469; makefile: 211; perl: 137; ansic: 44
file content (94 lines) | stat: -rw-r--r-- 3,820 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
### Please describe the problem.

I do not remember trying to add that file "unlocked" anyhow, but git-annex, upon 2nd invocation of `git status` flips the file claiming it should get to the "unlocked" git link from original symlink:

```
❯ git annex version
git-annex version: 10.20240531+git214-g28f5c47b5a-1~ndall+1

❯ git status
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
  (use "git push" to publish your local commits)

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   samples/UK_gla_3T_fMRI_consent_form_v3.0.docx

no changes added to commit (use "git add" and/or "git commit -a")

❯ git reset --hard
HEAD is now at 8700315 BF: fix leftover merge conflict in CONTRIBUTING.rst
```

so here from a clean state on first `git status` we get to dirty on subsequent:


```
❯ git status
git-annex: git status will show samples/UK_gla_3T_fMRI_consent_form_v3.0.docx to be modified, since content availability has changed and git-annex was unable to update the index. This is only a cosmetic problem affecting git status; git add, git commit, etc won't be affected. To fix the git status display, you can run: git-annex restage
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
  (use "git push" to publish your local commits)

nothing to commit, working tree clean

❯ git status
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
  (use "git push" to publish your local commits)

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   samples/UK_gla_3T_fMRI_consent_form_v3.0.docx

no changes added to commit (use "git add" and/or "git commit -a")

❯ git diff
diff --git a/samples/UK_gla_3T_fMRI_consent_form_v3.0.docx b/samples/UK_gla_3T_fMRI_consent_form_v3.0.docx
index 3215574..488e63f 100644
--- a/samples/UK_gla_3T_fMRI_consent_form_v3.0.docx
+++ b/samples/UK_gla_3T_fMRI_consent_form_v3.0.docx
@@ -1 +1 @@
-../.git/annex/objects/5M/wv/MD5E-s591826--1ca9251906259623f73a3aba47ef6369.0.docx/MD5E-s591826--1ca9251906259623f73a3aba47ef6369.0.docx
\ No newline at end of file
+/annex/objects/MD5E-s591826--1ca9251906259623f73a3aba47ef6369.0.docx

❯ git annex restage
restage  ok

❯ git diff

❯ git status
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
  (use "git push" to publish your local commits)

Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
	modified:   samples/UK_gla_3T_fMRI_consent_form_v3.0.docx

❯ git diff --cached
diff --git a/samples/UK_gla_3T_fMRI_consent_form_v3.0.docx b/samples/UK_gla_3T_fMRI_consent_form_v3.0.docx
index 3215574..488e63f 100644
--- a/samples/UK_gla_3T_fMRI_consent_form_v3.0.docx
+++ b/samples/UK_gla_3T_fMRI_consent_form_v3.0.docx
@@ -1 +1 @@
-../.git/annex/objects/5M/wv/MD5E-s591826--1ca9251906259623f73a3aba47ef6369.0.docx/MD5E-s591826--1ca9251906259623f73a3aba47ef6369.0.docx
\ No newline at end of file
+/annex/objects/MD5E-s591826--1ca9251906259623f73a3aba47ef6369.0.docx

```

This is on a local long-lived clone of http://github.com/con/open-brain-consent but seems to not happen on a fresh clone. So must be something about local "state".

Not sure if relates to the following issue under current investigation (but not yet addressed):

- [https://git-annex.branchable.com/bugs/assistant___40__webapp__41___commited_unlocked_link_to_annex/](https://git-annex.branchable.com/bugs/assistant___40__webapp__41___commited_unlocked_link_to_annex/)

[[!meta author=yoh]]
[[!tag projects/repronim]]

[[!meta title="pointer file in the form of annex symlink target gets restaged modified"]]