aboutsummaryrefslogtreecommitdiffstats
path: root/cache/repo_cache_bug.go
diff options
context:
space:
mode:
authorvince <vincetiu8@gmail.com>2020-07-24 11:25:38 +0800
committerMichael Muré <batolettre@gmail.com>2020-07-28 14:30:06 +0200
commit4e5f377d75824e31a058313cad2d2e478f348c28 (patch)
treecb2066a1b528a691589478a2260c1fbfbd681c96 /cache/repo_cache_bug.go
parent9436cf4b8983699ef7a164f4036686dd83d345d4 (diff)
downloadgit-bug-4e5f377d75824e31a058313cad2d2e478f348c28.tar.gz
Remove need to specify remote
This commit makes the removeBug command use the listRefs repo command to search for the bug, eliminating the need to input the remote the bug came from.
Diffstat (limited to 'cache/repo_cache_bug.go')
-rw-r--r--cache/repo_cache_bug.go13
1 files changed, 2 insertions, 11 deletions
diff --git a/cache/repo_cache_bug.go b/cache/repo_cache_bug.go
index c7e2ed34..34e2a144 100644
--- a/cache/repo_cache_bug.go
+++ b/cache/repo_cache_bug.go
@@ -361,23 +361,14 @@ func (c *RepoCache) NewBugRaw(author *IdentityCache, unixTime int64, title strin
}
// RemoveBug removes a bug from the cache and repo
-// args[0] specifies the bug prefix to remove
-// args[1] (if present) specifies the remote the bug was imported from
-func (c *RepoCache) RemoveBug(prefix string, remote string) error {
+func (c *RepoCache) RemoveBug(prefix string) error {
b, err := c.ResolveBugPrefix(prefix)
if err != nil {
return err
}
- if remote == "" {
- err = bug.RemoveLocalBug(c.repo, b.Id())
- } else {
- err = bug.RemoveRemoteBug(c.repo, remote, b.Id())
- }
- if err != nil {
- return err
- }
+ err = bug.RemoveBug(c.repo, b.Id())
delete(c.bugs, b.Id())
delete(c.bugExcerpts, b.Id())