From e6d25ea8217c4f0e48af7a59421c068f17b7f8bf Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 7 Mar 2024 15:03:42 +0100 Subject: [PATCH] Remove dead code --- splitter/cache.go | 7 +------ splitter/state.go | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/splitter/cache.go b/splitter/cache.go index 9818d12..507c738 100644 --- a/splitter/cache.go +++ b/splitter/cache.go @@ -120,13 +120,8 @@ func (c *cache) get(rev *git.Oid) *git.Oid { return oid } -func (c *cache) set(rev, newrev *git.Oid, created bool) { +func (c *cache) set(rev, newrev *git.Oid) { c.data[string(rev[0:20])] = newrev[0:20] - postfix := "/newest" - if created { - postfix = "/oldest" - } - c.data[string(append(newrev[0:20], []byte(postfix)...))] = rev[0:20] } func (c *cache) gets(commits []*git.Oid) []*git.Oid { diff --git a/splitter/state.go b/splitter/state.go index f14308f..cd80647 100644 --- a/splitter/state.go +++ b/splitter/state.go @@ -239,7 +239,7 @@ func (s *state) splitRev(rev *git.Commit) (*git.Oid, error) { s.result.incCreated() } - s.cache.set(rev.Id(), newrev, created) + s.cache.set(rev.Id(), newrev) return newrev, nil }