aboutsummaryrefslogtreecommitdiffstats
path: root/repository/git.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2018-08-19 13:58:55 +0200
committerMichael Muré <batolettre@gmail.com>2018-08-19 13:58:55 +0200
commitb58812136e404434ac01612cb4a573881f45eb55 (patch)
tree5039d3bc82190f3b4a836950d742ccb781917542 /repository/git.go
parent71523f23edcb02a94061941b45f24a1f1ea4231b (diff)
downloadgit-bug-b58812136e404434ac01612cb4a573881f45eb55.tar.gz
bug: remove use of the too recent %(refname:lstrip=-1) of git
fix #24
Diffstat (limited to 'repository/git.go')
-rw-r--r--repository/git.go19
1 files changed, 0 insertions, 19 deletions
diff --git a/repository/git.go b/repository/git.go
index d55def9e..5b5cbc3d 100644
--- a/repository/git.go
+++ b/repository/git.go
@@ -257,25 +257,6 @@ func (repo *GitRepo) ListRefs(refspec string) ([]string, error) {
return splitted, nil
}
-// ListIds will return a list of Git ref matching the given refspec,
-// stripped to only the last part of the ref
-func (repo *GitRepo) ListIds(refspec string) ([]string, error) {
- // the format option will strip the ref name to keep only the last part (ie, the bug id)
- stdout, err := repo.runGitCommand("for-each-ref", "--format=%(refname:lstrip=-1)", refspec)
-
- if err != nil {
- return nil, err
- }
-
- splitted := strings.Split(stdout, "\n")
-
- if len(splitted) == 1 && splitted[0] == "" {
- return []string{}, nil
- }
-
- return splitted, nil
-}
-
// RefExist will check if a reference exist in Git
func (repo *GitRepo) RefExist(ref string) (bool, error) {
stdout, err := repo.runGitCommand("for-each-ref", ref)