Browse Source

Check for non-fast-forward update error on push

Brendan Abolivier 7 years ago
parent
commit
cc1d718d23
Signed by: Brendan Abolivier <contact@brendanabolivier.com> GPG key ID: 8EF1500759F70623
1 changed files with 6 additions and 0 deletions
  1. 6
    0
      src/git/git.go

+ 6
- 0
src/git/git.go View File

106
 		return nil
106
 		return nil
107
 	}
107
 	}
108
 
108
 
109
+	// go-git doesn't have an error variable for "non-fast-forward update", so
110
+	// this is the only way to detect it
111
+	if strings.HasPrefix("non-fast-forward update", err.Error()) {
112
+		return nil
113
+	}
114
+
109
 	return err
115
 	return err
110
 }
116
 }