summaryrefslogtreecommitdiff
path: root/doc/bugs/modified_permissions_persist_after_unlock__44___commit.mdwn
blob: 907ae99b4eec9da04609e15ae0f51e494f40fa9b (plain)
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
### Please describe the problem.

Modifying an annexed file with unlock then commit leaves the link with permissions 777 and git status reports a typechange, which makes checkout impossible. Resolves by running git unlock on the file.

### What steps will reproduce the problem?

echo foo > test.txt
git annex add test.txt
git commit -a -m "first"
git annex unlock test.txt
echo foobar > test.txt
git commit -a -m "second"

git status (notice typechange message)

git unlock test.txt (corrects and retains both versions)

### What version of git-annex are you using? On what operating system?

git-annex version: 3.20120406
local repository version: 3
default repository version: 3
supported repository versions: 3
upgrade supported from repository versions: 0 1 2

git version 1.7.9.5


### Please provide any additional information below.

[[!format sh """
# If you can, paste a complete transcript of the problem occurring here.
# If the problem is with the git-annex assistant, paste in .git/annex/daemon.log


# End of transcript or log.
"""]]

[[!tag confirmed]]
[[!meta title="git commit of unlocked file leaves typechange staged in index"]]

> [[fixed|done]]; git-annex pre-commit will block such commits from being
> made. Git devs didn't seem to have a way to improve its behavior. --[[Joey]]