From 9dd91b393da6fa4aa48eb8e7d722afcd28de4690 Mon Sep 17 00:00:00 2001 From: tschwinge Date: Tue, 8 Jun 2010 09:21:43 +0000 Subject: File issue. --- .../Git:_changed_behavior_w.r.t._timestamps.mdwn | 180 +++++++++++++++++++++ 1 file changed, 180 insertions(+) create mode 100644 doc/bugs/Git:_changed_behavior_w.r.t._timestamps.mdwn (limited to 'doc/bugs/Git:_changed_behavior_w.r.t._timestamps.mdwn') diff --git a/doc/bugs/Git:_changed_behavior_w.r.t._timestamps.mdwn b/doc/bugs/Git:_changed_behavior_w.r.t._timestamps.mdwn new file mode 100644 index 000000000..5d5b9fc23 --- /dev/null +++ b/doc/bugs/Git:_changed_behavior_w.r.t._timestamps.mdwn @@ -0,0 +1,180 @@ +After some months, I just updated my local ikiwiki sources, and rebuilt +the Hurd web pages, . + +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 2008-09-11 18:11:53 UTC + + +new: + + Last edited 2008-09-11 18:12:22 UTC + + + +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 + AuthorDate: Thu Sep 11 20:11:53 2008 +0200 + Commit: arnebab + 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 + AuthorDate: Thu Sep 11 19:47:08 2008 +0200 + Commit: arnebab + 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 + AuthorDate: Fri Sep 12 23:40:55 2008 +0200 + Commit: Samuel Thibault + 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 + AuthorDate: Thu Sep 11 18:12:22 2008 +0000 + Commit: GNU Hurd wiki engine + CommitDate: Thu Sep 11 18:12:22 2008 +0000 + + Merge branch 'master' of wiki@192.168.10.50:wiki + + commit 8f1b97bfe45b2f173e3a7d55dee226a9e289a695 + Author: arnebab + AuthorDate: Thu Sep 11 20:11:53 2008 +0200 + Commit: arnebab + 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]] -- cgit v1.2.3 From c911b4b998992a69b5eea167658fb00c52a064a1 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 8 Jun 2010 14:46:54 -0400 Subject: response --- doc/bugs/Git:_changed_behavior_w.r.t._timestamps.mdwn | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'doc/bugs/Git:_changed_behavior_w.r.t._timestamps.mdwn') diff --git a/doc/bugs/Git:_changed_behavior_w.r.t._timestamps.mdwn b/doc/bugs/Git:_changed_behavior_w.r.t._timestamps.mdwn index 5d5b9fc23..6abe203a3 100644 --- a/doc/bugs/Git:_changed_behavior_w.r.t._timestamps.mdwn +++ b/doc/bugs/Git:_changed_behavior_w.r.t._timestamps.mdwn @@ -178,3 +178,12 @@ 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]] -- cgit v1.2.3 From 4eb82e7d4161114c6a2194f8f887629ab86162c8 Mon Sep 17 00:00:00 2001 From: tschwinge Date: Wed, 9 Jun 2010 13:47:35 +0000 Subject: Comment and done. --- doc/bugs/Git:_changed_behavior_w.r.t._timestamps.mdwn | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'doc/bugs/Git:_changed_behavior_w.r.t._timestamps.mdwn') diff --git a/doc/bugs/Git:_changed_behavior_w.r.t._timestamps.mdwn b/doc/bugs/Git:_changed_behavior_w.r.t._timestamps.mdwn index 6abe203a3..4ce7cc3df 100644 --- a/doc/bugs/Git:_changed_behavior_w.r.t._timestamps.mdwn +++ b/doc/bugs/Git:_changed_behavior_w.r.t._timestamps.mdwn @@ -187,3 +187,19 @@ intentional? Otherwise I could supply a patch. > 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). + +>> 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]] -- cgit v1.2.3 From 0da7b1a9c33b3ff67fade15c395672f02bfe6a45 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 9 Jun 2010 13:42:13 -0400 Subject: clarification --- doc/bugs/Git:_changed_behavior_w.r.t._timestamps.mdwn | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'doc/bugs/Git:_changed_behavior_w.r.t._timestamps.mdwn') diff --git a/doc/bugs/Git:_changed_behavior_w.r.t._timestamps.mdwn b/doc/bugs/Git:_changed_behavior_w.r.t._timestamps.mdwn index 4ce7cc3df..164e62075 100644 --- a/doc/bugs/Git:_changed_behavior_w.r.t._timestamps.mdwn +++ b/doc/bugs/Git:_changed_behavior_w.r.t._timestamps.mdwn @@ -191,6 +191,15 @@ intentional? Otherwise I could supply a patch. >> 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. -- cgit v1.2.3