소스 검색

Fix wrong call to HasPrefix

Brendan Abolivier 7 년 전
부모
커밋
c680c2a359
로그인 계정: Brendan Abolivier <contact@brendanabolivier.com> GPG 키 ID: 8EF1500759F70623
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2
    2
      src/git/git.go

+ 2
- 2
src/git/git.go 파일 보기

75
 
75
 
76
 	// go-git doesn't have an error variable for "non-fast-forward update", so
76
 	// go-git doesn't have an error variable for "non-fast-forward update", so
77
 	// this is the only way to detect it
77
 	// this is the only way to detect it
78
-	if strings.HasPrefix("non-fast-forward update", err.Error()) {
78
+	if strings.HasPrefix(err.Error(), "non-fast-forward update") {
79
 		return r, nil
79
 		return r, nil
80
 	}
80
 	}
81
 
81
 
108
 
108
 
109
 	// go-git doesn't have an error variable for "non-fast-forward update", so
109
 	// go-git doesn't have an error variable for "non-fast-forward update", so
110
 	// this is the only way to detect it
110
 	// this is the only way to detect it
111
-	if strings.HasPrefix("non-fast-forward update", err.Error()) {
111
+	if strings.HasPrefix(err.Error(), "non-fast-forward update") {
112
 		return nil
112
 		return nil
113
 	}
113
 	}
114
 
114