diff options
| author | Jeff Carr <[email protected]> | 2025-09-11 06:31:38 -0500 | 
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-09-11 06:31:38 -0500 | 
| commit | 1c8f502c1b88ff2e819a82bb669707aebffa537a (patch) | |
| tree | ccb86b053fc01b6ec3624a5b70a06fc5667d9824 | |
| parent | a72e9ce5f4062fb78c82f1380d7a86ee4cc47294 (diff) | |
| -rw-r--r-- | git.go | 58 | 
1 files changed, 0 insertions, 58 deletions
@@ -40,61 +40,3 @@ func (rs *RepoStatus) checkCurrentBranchName() string {  	rs.NoteChange("current branch has changed from " + currentname + " to " + out)  	return out  } - -/* -func (rs *RepoStatus) oldgitDescribeByHash(hash string) (string, error) { -	if hash == "" { -		return "", errors.New("hash was blank") -	} -	r := shell.PathRunLog(rs.realPath.String(), []string{"git", "describe", "--tags", "--always", hash}, INFO) -	out := strings.Join(r.Stdout, "\n") -	if r.Error != nil { -		log.Warn("not in a git repo or bad hash?", r.Error, rs.Path()) -		return out, r.Error -	} -	return out, r.Error -} - -func (rs *RepoStatus) oldgitDescribeByName(name string) (string, error) { -	name = strings.TrimSpace(name) - -	if name == "" { -		// git will return the current tag -		r := shell.PathRunLog(rs.Path(), []string{"git", "describe", "--tags", "--always"}, INFO) -		output := strings.Join(r.Stdout, "\n") -		if r.Error != nil { -			log.Warn("gitDescribeByName() not in a git repo?", r.Error, rs.Path()) -		} -		return strings.TrimSpace(output), r.Error -	} -	if !rs.LocalTagExists(name) { -		// tag does not exist -		return "", errors.New("gitDescribeByName() git fatal: Not a valid object name") -	} -	cmd := []string{"git", "describe", "--tags", "--always", name} -	r := shell.PathRunLog(rs.Path(), cmd, INFO) -	output := strings.Join(r.Stdout, "\n") -	if r.Error != nil { -		log.Warn("cmd =", cmd) -		log.Warn("err =", r.Error) -		log.Warn("not in a git repo or bad tag?", rs.Path()) -	} - -	return strings.TrimSpace(output), r.Error -} -*/ - -/* -func (rs *RepoStatus) populateTags() { -	tmp := rs.realPath.String() + "/.git/refs/tags" -	log.Log(REPO, "populateTags() path =", tmp) -	for _, tag := range gitpb.ListFiles(tmp) { -		if rs.tags[tag] == "" { -			log.Log(REPO, "populateTags() Adding new tag", tag) -			// rs.tagsDrop.AddText(tag) -			rs.tags[tag] = "origin" -		} -	} -	// rs.tagsDrop.SetText(rs.lasttagrev) -} -*/  | 
