mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-26 12:27:06 +00:00 
			
		
		
		
	Be more strict with git arguments (#7715)
* Be more strict with git arguments * fix-up commit test * use bindings for branch name
This commit is contained in:
		| @@ -12,7 +12,7 @@ import ( | ||||
| // ReadTreeToIndex reads a treeish to the index | ||||
| func (repo *Repository) ReadTreeToIndex(treeish string) error { | ||||
| 	if len(treeish) != 40 { | ||||
| 		res, err := NewCommand("rev-parse", treeish).RunInDir(repo.Path) | ||||
| 		res, err := NewCommand("rev-parse", "--verify", treeish).RunInDir(repo.Path) | ||||
| 		if err != nil { | ||||
| 			return err | ||||
| 		} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 zeripath
					zeripath