mirror of
https://github.com/MichaelMure/git-bug.git
synced 2024-12-14 17:51:44 +03:00
28 lines
471 B
Go
28 lines
471 B
Go
package bug
|
|
|
|
import (
|
|
"github.com/MichaelMure/git-bug/repository"
|
|
)
|
|
|
|
// Witnesser will read all the available Bug to recreate the different logical
|
|
// clocks
|
|
func Witnesser(repo repository.ClockedRepo) error {
|
|
for b := range ReadAllLocalBugs(repo) {
|
|
if b.Err != nil {
|
|
return b.Err
|
|
}
|
|
|
|
err := repo.WitnessCreate(b.Bug.createTime)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
err = repo.WitnessEdit(b.Bug.editTime)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
}
|
|
|
|
return nil
|
|
}
|