aboutsummaryrefslogtreecommitdiffstats
path: root/misc
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2019-05-27 21:14:55 +0200
committerMichael Muré <batolettre@gmail.com>2019-05-27 21:14:55 +0200
commitc7abac388aadd274d4f23f996a15f8bba90f2a92 (patch)
treeced1116de500346eb340f72b7bfc672136e40c1e /misc
parent9865dfcdf0810e288283f2ef4eba450041db32f9 (diff)
downloadgit-bug-c7abac388aadd274d4f23f996a15f8bba90f2a92.tar.gz
repo: refactor how test repo are created/cleaned
Diffstat (limited to 'misc')
-rw-r--r--misc/random_bugs/create_random_bugs.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/misc/random_bugs/create_random_bugs.go b/misc/random_bugs/create_random_bugs.go
index 0657c808..ea8833ee 100644
--- a/misc/random_bugs/create_random_bugs.go
+++ b/misc/random_bugs/create_random_bugs.go
@@ -29,6 +29,17 @@ func DefaultOptions() Options {
}
}
+func FillRepo(repo repository.ClockedRepo, bugNumber int) {
+ FillRepoWithSeed(repo, bugNumber, time.Now().UnixNano())
+}
+
+func FillRepoWithSeed(repo repository.ClockedRepo, bugNumber int, seed int64) {
+ options := DefaultOptions()
+ options.BugNumber = bugNumber
+
+ CommitRandomBugsWithSeed(repo, options, seed)
+}
+
func CommitRandomBugs(repo repository.ClockedRepo, opts Options) {
CommitRandomBugsWithSeed(repo, opts, time.Now().UnixNano())
}