aboutsummaryrefslogtreecommitdiffstats
path: root/repository/git.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2018-07-12 21:28:43 +0200
committerMichael Muré <batolettre@gmail.com>2018-07-12 21:32:10 +0200
commit3087a472bfe61db806a052ea2afd57d22b8c5d95 (patch)
tree8a4a12a56de1d739c216a27919797c3663aff27d /repository/git.go
parentcda8114fda8d349bbaeefb42cc33ba715d41cf08 (diff)
downloadgit-bug-3087a472bfe61db806a052ea2afd57d22b8c5d95.tar.gz
move Hash in /util/
Diffstat (limited to 'repository/git.go')
-rw-r--r--repository/git.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/repository/git.go b/repository/git.go
index 679d24fc..b41bc95c 100644
--- a/repository/git.go
+++ b/repository/git.go
@@ -5,6 +5,7 @@ import (
"bytes"
"crypto/sha1"
"fmt"
+ "github.com/MichaelMure/git-bug/util"
"io"
"os"
"os/exec"
@@ -115,14 +116,14 @@ func (repo *GitRepo) PushRefs(remote string, refPattern string) error {
}
// StoreData will store arbitrary data and return the corresponding hash
-func (repo *GitRepo) StoreData(data []byte) (Hash, error) {
+func (repo *GitRepo) StoreData(data []byte) (util.Hash, error) {
var stdin = bytes.NewReader(data)
var stdout bytes.Buffer
var stderr bytes.Buffer
err := repo.runGitCommandWithIO(stdin, &stdout, &stderr, "hash-object", "--stdin", "-w")
- return Hash(stdout.String()), err
+ return util.Hash(stdout.String()), err
}
/*