rm old code
This commit is contained in:
parent
366f4680ac
commit
8c54c4a7d8
|
@ -23,7 +23,7 @@ import (
|
||||||
func (repo *Repo) CheckBranches() bool {
|
func (repo *Repo) CheckBranches() bool {
|
||||||
var hashCheck string
|
var hashCheck string
|
||||||
var perfect bool = true
|
var perfect bool = true
|
||||||
all := repo.getBranches()
|
all := repo.GetBranches()
|
||||||
path := filepath.Join(repo.FullPath, ".git/refs/")
|
path := filepath.Join(repo.FullPath, ".git/refs/")
|
||||||
for _, b := range all {
|
for _, b := range all {
|
||||||
parts := strings.Split(b, "/")
|
parts := strings.Split(b, "/")
|
||||||
|
@ -72,12 +72,12 @@ func (repo *Repo) CheckBranches() bool {
|
||||||
return perfect
|
return perfect
|
||||||
}
|
}
|
||||||
|
|
||||||
func (repo *Repo) getBranches() []string {
|
func (repo *Repo) GetBranches() []string {
|
||||||
var all []string
|
var all []string
|
||||||
var heads []string
|
var heads []string
|
||||||
var remotes []string
|
var remotes []string
|
||||||
heads = listFiles(filepath.Join(repo.GetFullPath(), "/.git/refs/heads"))
|
heads = ListFiles(filepath.Join(repo.GetFullPath(), "/.git/refs/heads"))
|
||||||
remotes = listFiles(filepath.Join(repo.GetFullPath(), "/.git/refs/remotes"))
|
remotes = ListFiles(filepath.Join(repo.GetFullPath(), "/.git/refs/remotes"))
|
||||||
|
|
||||||
all = heads
|
all = heads
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ func (repo *Repo) getBranches() []string {
|
||||||
|
|
||||||
// goes in one directory so it gets remote branch names
|
// goes in one directory so it gets remote branch names
|
||||||
// old code. todo: modernize it
|
// old code. todo: modernize it
|
||||||
func listFiles(directory string) []string {
|
func ListFiles(directory string) []string {
|
||||||
var files []string
|
var files []string
|
||||||
fileInfo, err := os.ReadDir(directory)
|
fileInfo, err := os.ReadDir(directory)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue