diff options
author | Michael Muré <michael.mure@consensys.net> | 2019-01-16 21:23:49 +0100 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2019-03-01 22:35:37 +0100 |
commit | 06d9c6872655b85f1a47599add92d49d570e7b2e (patch) | |
tree | eef3f140d726450d66e49b4225a527b1b93a62a5 /bug | |
parent | feab9412dffe5772048aad29893c4cb01d566387 (diff) | |
download | git-bug-06d9c6872655b85f1a47599add92d49d570e7b2e.tar.gz |
identity: implement the loading from git
Diffstat (limited to 'bug')
-rw-r--r-- | bug/bug.go | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -113,13 +113,6 @@ func ReadRemoteBug(repo repository.ClockedRepo, remote string, id string) (*Bug, // readBug will read and parse a Bug from git func readBug(repo repository.ClockedRepo, ref string) (*Bug, error) { - hashes, err := repo.ListCommits(ref) - - // TODO: this is not perfect, it might be a command invoke error - if err != nil { - return nil, ErrBugNotExist - } - refSplit := strings.Split(ref, "/") id := refSplit[len(refSplit)-1] @@ -127,6 +120,13 @@ func readBug(repo repository.ClockedRepo, ref string) (*Bug, error) { return nil, fmt.Errorf("invalid ref length") } + hashes, err := repo.ListCommits(ref) + + // TODO: this is not perfect, it might be a command invoke error + if err != nil { + return nil, ErrBugNotExist + } + bug := Bug{ id: id, } |