Skip to content

Commit fee5c96

Browse files
Remove debug logs
1 parent 566b8f1 commit fee5c96

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

git/git.go

+2-3
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ func Dir() (string, error) {
8484
}
8585

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

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

205204
func SymbolicRef(ref string) (string, error) {
206-
output, err := execGit("symbolic-ref", ref)
205+
output, err := execGitQuiet("symbolic-ref", ref)
207206
if err != nil {
208207
return "", err
209208
}

0 commit comments

Comments
 (0)