From b74c49a6af84e6ab50018024e8862263b1e0bd6d Mon Sep 17 00:00:00 2001 From: Tetsuo Handa Date: Fri, 9 Oct 2020 22:09:50 +0900 Subject: pkg/vcs: use committer date The Freshness columns in Instances: table on the dashboard page look outdated, for these fields are showing when that patch was authored. Where possible, using when that patch was committed into the tree in question would be more meaningful. Update #1537 --- pkg/vcs/git_test.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'pkg/vcs/git_test.go') diff --git a/pkg/vcs/git_test.go b/pkg/vcs/git_test.go index 62a5ee06f..053dc6d33 100644 --- a/pkg/vcs/git_test.go +++ b/pkg/vcs/git_test.go @@ -18,6 +18,8 @@ rbtree: include rcu.h foobar@foobar.de Foo Bar Fri May 11 16:02:14 2018 -0700 +78eb0c6356cda285c6ee6e29bea0c0188368103e +Fri May 11 17:28:45 2018 -0700 Since commit c1adf20052d8 ("Introduce rb_replace_node_rcu()") rbtree_augmented.h uses RCU related data structures but does not include the header file. It works as long as it gets somehow included before @@ -47,7 +49,8 @@ Signed-off-by: Linux Master "subsystem@reviewer.com", "yetanother@email.org", }, To), - Date: time.Date(2018, 5, 11, 16, 02, 14, 0, time.FixedZone("", -7*60*60)), + Date: time.Date(2018, 5, 11, 16, 02, 14, 0, time.FixedZone("", -7*60*60)), + CommitDate: time.Date(2018, 5, 11, 17, 28, 45, 0, time.FixedZone("", -7*60*60)), }, } for input, com := range tests { @@ -76,6 +79,9 @@ Signed-off-by: Linux Master if !com.Date.Equal(res.Date) { t.Fatalf("want date %v, got %v", com.Date, res.Date) } + if !com.CommitDate.Equal(res.CommitDate) { + t.Fatalf("want date %v, got %v", com.CommitDate, res.CommitDate) + } } } -- cgit mrf-deployment