mirror of
https://github.com/splitsh/lite.git
synced 2024-05-17 05:36:37 +02:00
commit
2e82f4a273
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue