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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
|
After some months, I just updated my local ikiwiki sources, and rebuilt
the Hurd web pages, <http://git.savannah.gnu.org/cgit/hurd/web.git/>.
I was confused, having switched to the new automatic (thanks!) --gettime
mechanism, why on some pages the timestamps had changed compared to my
previous use of --getctime and setting files' mtimes (using a script)
according to the last Git commit. For example:
community/weblogs/ArneBab/2008-08-02-gnu_hurd_and_x.html
old:
Last edited <span class="date">2008-09-11 18:11:53 UTC</span>
<!-- Created <span class="date">2008-09-11 17:47:08 UTC</span> -->
new:
Last edited <span class="date">2008-09-11 18:12:22 UTC</span>
<!-- Created <span class="date">2008-09-11 17:47:50 UTC</span> -->
I had a look at what git.pm is doing, and began to manually replay /
investigate:
$ git log --pretty=fuller --name-only --relative -- community/weblogs/ArneBab/2008-08-02-gnu_hurd_and_x.mdwn
commit 8f1b97bfe45b2f173e3a7d55dee226a9e289a695
Author: arnebab <arne_bab@web.de>
AuthorDate: Thu Sep 11 20:11:53 2008 +0200
Commit: arnebab <arne_bab@web.de>
CommitDate: Thu Sep 11 20:11:53 2008 +0200
Added a link to the X.org guide in this wiki.
community/weblogs/ArneBab/2008-08-02-gnu_hurd_and_x.mdwn
commit 3ef8b7d80d80572c436c4c60c71879bc74409816
Author: arnebab <arne_bab@web.de>
AuthorDate: Thu Sep 11 19:47:08 2008 +0200
Commit: arnebab <arne_bab@web.de>
CommitDate: Thu Sep 11 19:47:08 2008 +0200
Minor update on the enty trying to get X working -> 'watch this place for updates'
community/weblogs/ArneBab/2008-08-02-gnu_hurd_and_x.mdwn
OK, these are my old dates.
$ git log --pretty=format:%ci --name-only --relative -- community/weblogs/ArneBab/2008-08-02-gnu_hurd_and_x.mdwn
2008-09-11 20:11:53 +0200
community/weblogs/ArneBab/2008-08-02-gnu_hurd_and_x.mdwn
2008-09-11 19:47:08 +0200
community/weblogs/ArneBab/2008-08-02-gnu_hurd_and_x.mdwn
$ git log --pretty=format:%ct --name-only --relative -- community/weblogs/ArneBab/2008-08-02-gnu_hurd_and_x.mdwn
1221156713
community/weblogs/ArneBab/2008-08-02-gnu_hurd_and_x.mdwn
1221155228
community/weblogs/ArneBab/2008-08-02-gnu_hurd_and_x.mdwn
$ date -d @1221156713
Thu Sep 11 18:11:53 UTC 2008
$ date -d @1221155228
Thu Sep 11 17:47:08 UTC 2008
That's all consistent.
But:
$ perl -le 'use Storable; my $index=Storable::retrieve("indexdb"); use Data::Dumper; print Dumper $index'
[...]
'community/weblogs/ArneBab/2008-08-02-gnu_hurd_and_x.mdwn' => {
'ctime' => '1221155270',
'dest' => [
'community/weblogs/ArneBab/2008-08-02-gnu_hurd_and_x.html'
],
'typedlinks' => {
'tag' => {}
},
'mtime' => 1221156742,
'depends_simple' => {
'sidebar' => 1
},
'links' => [
'community/weblogs/ArneBab/2008-08-02-gnu_hurd_and_x/discussion',
'Hurd/DebianXorg'
],
'state' => {
[...]
$ date -d @1221156742
Thu Sep 11 18:12:22 UTC 2008
$ date -d @1221155270
Thu Sep 11 17:47:50 UTC 2008
That's different, and it matches what the new ikiwiki writes into the
HTML file.
Back to Git again, this time without specifying the file:
$ git log --pretty=format:%ct --name-only --relative
[...]
1221255713
1221255655
unsorted/PortingIssues.mdwn
1221156742 [Thu Sep 11 18:12:22 UTC 2008]
1221156713 [Thu Sep 11 18:11:53 UTC 2008]
community/weblogs/ArneBab/2008-08-02-gnu_hurd_and_x.mdwn
1221156267
1221156235
index.mdwn
1221156122
1221156091
index.mdwn
1221155942
1221155910
index.mdwn
1221155270 [Thu Sep 11 17:47:50 UTC 2008]
1221155228 [Thu Sep 11 17:47:08 UTC 2008]
community/weblogs/ArneBab/2008-08-02-gnu_hurd_and_x.mdwn
1221154986
community/gsoc.mdwn
community/gsoc/project_ideas.mdwn
1221147244
whatsnew.html
[...]
Aha!
... and some more detail:
$ git log --pretty=fuller --name-only --relative
[...]
commit e4e89e1683012c879012522105a3471a00714613
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
AuthorDate: Fri Sep 12 23:40:55 2008 +0200
Commit: Samuel Thibault <samuel.thibault@ens-lyon.org>
CommitDate: Fri Sep 12 23:40:55 2008 +0200
MSG_NOSIGNAL and IPV6_PKTINFO got fixed
unsorted/PortingIssues.mdwn
commit c389fae98dff86527be62f895ff7272e4ab1932c
Merge: 0339e3e 8f1b97b
Author: GNU Hurd wiki engine <web-hurd@gnu.org>
AuthorDate: Thu Sep 11 18:12:22 2008 +0000
Commit: GNU Hurd wiki engine <web-hurd@gnu.org>
CommitDate: Thu Sep 11 18:12:22 2008 +0000
Merge branch 'master' of wiki@192.168.10.50:wiki
commit 8f1b97bfe45b2f173e3a7d55dee226a9e289a695
Author: arnebab <arne_bab@web.de>
AuthorDate: Thu Sep 11 20:11:53 2008 +0200
Commit: arnebab <arne_bab@web.de>
CommitDate: Thu Sep 11 20:11:53 2008 +0200
Added a link to the X.org guide in this wiki.
community/weblogs/ArneBab/2008-08-02-gnu_hurd_and_x.mdwn
[...]
So, merges are involved there.
What (the new) ikiwiki code does, is use the timestamp when the merge was
done instead of the timestamp when the commit was done. Is this
intentional? Otherwise I could supply a patch.
--[[tschwinge]]
> In order to be nice and fast, the git backend runs git log once
> and records data for all files. Rather than looking at the log for a
> given file. So amoung other things, it does not follow renames.
>
> AFAICS, git log only shows merges modifying files if it was a conflicted
> merge. As the file is then actually modified to resolve the merge
> I think it makes sense to count the merge as the last modification in
> that case. --[[Joey]]
>> That'd be reasonable, but `git log` will also show merges that are not
>> conflicting (as in my case).
>>> Actually when displaying a merge, `git log --stat` only lists files that
>>> were actually modified in a new way as part of the merge resolution.
>>> Ie, if the merge resolution only joins together some of the parent
>>> hunks, the file is not listed as having been modified.
>>>
>>> So, no, ikiwiki's use of git log will not show files modified in
>>> non-conflicting merges.
>>> --[[Joey]]
>> Yet, I'm not totally disagreeing with your choice. With this `git
>> log` invocation, you're not able to tell from its output whether a
>> conflict was resolved or not.
>> Also, it's a bit like the *should we use the **author timestamp** or
>> **commit timestamp*** discussion. Your code will always use the
>> latest timestamp.
>> I guess I'll get my head wrapped around that, and it's fine, so this is
>> [[done]].
>> --[[tschwinge]]
|