mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 21:28:11 +09:00 
			
		
		
		
	Upgrade vendor "git" (#161)
This commit is contained in:
		
							
								
								
									
										5
									
								
								vendor/code.gitea.io/git/doc.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								vendor/code.gitea.io/git/doc.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,5 @@ | ||||
| // Copyright 2016 The Gitea Authors. All rights reserved. | ||||
| // Use of this source code is governed by a MIT-style | ||||
| // license that can be found in the LICENSE file. | ||||
|  | ||||
| package git // import "code.gitea.io/git" | ||||
							
								
								
									
										4
									
								
								vendor/code.gitea.io/git/hook.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								vendor/code.gitea.io/git/hook.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -102,13 +102,13 @@ func ListHooks(repoPath string) (_ []*Hook, err error) { | ||||
| } | ||||
|  | ||||
| const ( | ||||
| 	HookPathUpdate = "hooks/update" | ||||
| 	HOOK_PATH_UPDATE = "hooks/update" | ||||
| ) | ||||
|  | ||||
| // SetUpdateHook writes given content to update hook of the reposiotry. | ||||
| func SetUpdateHook(repoPath, content string) (err error) { | ||||
| 	log("Setting update hook: %s", repoPath) | ||||
| 	hookPath := path.Join(repoPath, HookPathUpdate) | ||||
| 	hookPath := path.Join(repoPath, HOOK_PATH_UPDATE) | ||||
| 	if com.IsExist(hookPath) { | ||||
| 		err = os.Remove(hookPath) | ||||
| 	} else { | ||||
|   | ||||
							
								
								
									
										4
									
								
								vendor/code.gitea.io/git/repo.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								vendor/code.gitea.io/git/repo.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -121,6 +121,7 @@ func Clone(from, to string, opts CloneRepoOptions) (err error) { | ||||
| type PullRemoteOptions struct { | ||||
| 	Timeout time.Duration | ||||
| 	All     bool | ||||
| 	Rebase  bool | ||||
| 	Remote  string | ||||
| 	Branch  string | ||||
| } | ||||
| @@ -128,6 +129,9 @@ type PullRemoteOptions struct { | ||||
| // Pull pulls changes from remotes. | ||||
| func Pull(repoPath string, opts PullRemoteOptions) error { | ||||
| 	cmd := NewCommand("pull") | ||||
| 	if opts.Rebase { | ||||
| 		cmd.AddArguments("--rebase") | ||||
| 	} | ||||
| 	if opts.All { | ||||
| 		cmd.AddArguments("--all") | ||||
| 	} else { | ||||
|   | ||||
							
								
								
									
										8
									
								
								vendor/code.gitea.io/git/tree_entry.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										8
									
								
								vendor/code.gitea.io/git/tree_entry.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -11,7 +11,6 @@ import ( | ||||
| 	"sort" | ||||
| 	"strconv" | ||||
| 	"strings" | ||||
| 	"time" | ||||
| ) | ||||
|  | ||||
| type EntryMode int | ||||
| @@ -94,11 +93,11 @@ func (tes Entries) Less(i, j int) bool { | ||||
| 	t1, t2 := tes[i], tes[j] | ||||
| 	var k int | ||||
| 	for k = 0; k < len(sorter)-1; k++ { | ||||
| 		sort := sorter[k] | ||||
| 		s := sorter[k] | ||||
| 		switch { | ||||
| 		case sort(t1, t2): | ||||
| 		case s(t1, t2): | ||||
| 			return true | ||||
| 		case sort(t2, t1): | ||||
| 		case s(t2, t1): | ||||
| 			return false | ||||
| 		} | ||||
| 	} | ||||
| @@ -157,7 +156,6 @@ func (tes Entries) GetCommitsInfo(commit *Commit, treePath string) ([][]interfac | ||||
|  | ||||
| 		if tes[i].Type != OBJECT_COMMIT { | ||||
| 			go func(i int) { | ||||
| 				time.Sleep(200 * time.Millisecond) | ||||
| 				cinfo := commitInfo{entryName: tes[i].Name()} | ||||
| 				c, err := commit.GetCommitByPath(filepath.Join(treePath, tes[i].Name())) | ||||
| 				if err != nil { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user