summaryrefslogtreecommitdiff
path: root/doc/bugs/modified_permissions_persist_after_unlock__44___commit/comment_2_63b4d22c624ac4a218b05813ac4d0db2._comment
blob: 75e23a79175b137b85ada7858a3ea99f4a3824ce (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
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
95
96
97
98
99
100
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawn0hu_TPhLcUM1Ivvn7iIoZ_iD3g_5WDcs"
 nickname="Greg"
 subject="comment 2"
 date="2014-10-06T17:04:32Z"
 content="""
Perhaps it's expected, but looks like the hooks don't get called for this form:

git commit <filename> -m msg

Transcript:

ubuntu@hostname:~$ mkdir annex
ubuntu@hostname:~$ cd annex
ubuntu@hostname:~/annex$ ls
ubuntu@hostname:~/annex$ git init .
Initialized empty Git repository in /home/ubuntu/annex/.git/
ubuntu@hostname:~/annex$ git annex init \"test annex\"
init test annex ok
ubuntu@hostname:~/annex$ echo \"foo\" > test.txt
ubuntu@hostname:~/annex$ ls
test.txt
ubuntu@hostname:~/annex$ ls -al
total 16
drwxrwxr-x 3 ubuntu ubuntu 4096 Oct  6 16:43 .
drwxr-xr-x 7 ubuntu ubuntu 4096 Oct  6 16:42 ..
drwxrwxr-x 9 ubuntu ubuntu 4096 Oct  6 16:42 .git
-rw-rw-r-- 1 ubuntu ubuntu    4 Oct  6 16:43 test.txt
ubuntu@hostname:~/annex$ git annex add test.txt
add test.txt (checksum...) ok
(Recording state in git...)
ubuntu@hostname:~/annex$ ls -al
total 16
drwxrwxr-x 3 ubuntu ubuntu 4096 Oct  6 16:48 .
drwxr-xr-x 7 ubuntu ubuntu 4096 Oct  6 16:42 ..
drwxrwxr-x 9 ubuntu ubuntu 4096 Oct  6 16:48 .git
lrwxrwxrwx 1 ubuntu ubuntu  176 Oct  6 16:43 test.txt -> .git/annex/objects/8Z/1J/SHA256-s4--b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c/SHA256-s4--b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c
ubuntu@hostname:~/annex$ git commit test.txt
Aborting commit due to empty commit message.
ubuntu@hostname:~/annex$ git commit test.txt -m first
[master (root-commit) 38a8e18] first
 Committer: Ubuntu <ubuntu@hostname.us-west-1.compute.internal>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly:

    git config --global user.name \"Your Name\"
    git config --global user.email you@example.com

After doing this, you may fix the identity used for this commit with:

    git commit --amend --reset-author

 1 file changed, 1 insertion(+)
 create mode 120000 test.txt
ubuntu@hostname:~/annex$ ls -al
total 16
drwxrwxr-x 3 ubuntu ubuntu 4096 Oct  6 16:48 .
drwxr-xr-x 7 ubuntu ubuntu 4096 Oct  6 16:42 ..
drwxrwxr-x 9 ubuntu ubuntu 4096 Oct  6 16:49 .git
lrwxrwxrwx 1 ubuntu ubuntu  176 Oct  6 16:43 test.txt -> .git/annex/objects/8Z/1J/SHA256-s4--b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c/SHA256-s4--b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c
ubuntu@hostname:~/annex$ git annex unlock test.txt
unlock test.txt (copying...) ok
ubuntu@hostname:~/annex$ cat test.txt
foo
ubuntu@hostname:~/annex$ echo foobar > test.txt
ubuntu@hostname:~/annex$ git commit test.txt -m second
add test.txt (checksum...) ok
ok
(Recording state in git...)
[master f265461] second
 Committer: Ubuntu <ubuntu@hostname.us-west-1.compute.internal>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly:

    git config --global user.name \"Your Name\"
    git config --global user.email you@example.com

After doing this, you may fix the identity used for this commit with:

    git commit --amend --reset-author

 1 file changed, 1 insertion(+), 1 deletion(-)
ubuntu@hostname:~/annex$ git status
# On branch master
# Changes to be committed:
#   (use \"git reset HEAD <file>...\" to unstage)
#
#       typechange: test.txt
#
# Changes not staged for commit:
#   (use \"git add <file>...\" to update what will be committed)
#   (use \"git checkout -- <file>...\" to discard changes in working directory)
#
#       typechange: test.txt
#
ubuntu@hostname:~/annex$

"""]]