mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 12:18:26 +00:00 
			
		
		
		
	| @@ -87,8 +87,8 @@ func AddChanges(repoPath string, all bool, files ...string) error { | ||||
| } | ||||
|  | ||||
| // AddChangesWithArgs marks local changes to be ready for commit. | ||||
| func AddChangesWithArgs(repoPath string, gloablArgs []string, all bool, files ...string) error { | ||||
| 	cmd := NewCommandNoGlobals(append(gloablArgs, "add")...) | ||||
| func AddChangesWithArgs(repoPath string, globalArgs []string, all bool, files ...string) error { | ||||
| 	cmd := NewCommandNoGlobals(append(globalArgs, "add")...) | ||||
| 	if all { | ||||
| 		cmd.AddArguments("--all") | ||||
| 	} | ||||
|   | ||||
| @@ -117,7 +117,7 @@ func (a *BasicTransferAdapter) performRequest(ctx context.Context, method string | ||||
| func handleErrorResponse(resp *http.Response) error { | ||||
| 	defer resp.Body.Close() | ||||
|  | ||||
| 	er, err := decodeReponseError(resp.Body) | ||||
| 	er, err := decodeResponseError(resp.Body) | ||||
| 	if err != nil { | ||||
| 		return fmt.Errorf("Request failed with status %s", resp.Status) | ||||
| 	} | ||||
| @@ -125,7 +125,7 @@ func handleErrorResponse(resp *http.Response) error { | ||||
| 	return errors.New(er.Message) | ||||
| } | ||||
|  | ||||
| func decodeReponseError(r io.Reader) (ErrorResponse, error) { | ||||
| func decodeResponseError(r io.Reader) (ErrorResponse, error) { | ||||
| 	var er ErrorResponse | ||||
| 	err := json.NewDecoder(r).Decode(&er) | ||||
| 	if err != nil { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user