Skip to content

Commit

Permalink
Remove debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobwgillespie committed Jun 17, 2021
1 parent 566b8f1 commit fee5c96
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions git/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func Dir() (string, error) {
}

func DefaultBranch(remote string) string {
if name, err := SymbolicRef(fmt.Sprintf("refs/remotes/%s/HEAD", remote)); err != nil {
if name, err := SymbolicRef(fmt.Sprintf("refs/remotes/%s/HEAD", remote)); err == nil {
return name
}
return "refs/heads/main"
Expand Down Expand Up @@ -188,7 +188,6 @@ func Spawn(args ...string) error {
}

func Quiet(args ...string) bool {
fmt.Printf("%v\n", args)
cmd := exec.Command("git", args...)
cmd.Stderr = os.Stderr
return cmd.Run() == nil
Expand All @@ -203,7 +202,7 @@ func SymbolicFullName(name string) (string, error) {
}

func SymbolicRef(ref string) (string, error) {
output, err := execGit("symbolic-ref", ref)
output, err := execGitQuiet("symbolic-ref", ref)
if err != nil {
return "", err
}
Expand Down

0 comments on commit fee5c96

Please sign in to comment.