mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 02:46:04 +01:00 
			
		
		
		
	Fix lfs management find (#15537)
Fix #15236 * Do not do 40byte conversion within ParseTreeLine * Missed a to40ByteSHA Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
		| @@ -127,11 +127,12 @@ func FindLFSFile(repo *git.Repository, hash git.SHA1) ([]*LFSResult, error) { | ||||
| 			case "tree": | ||||
| 				var n int64 | ||||
| 				for n < size { | ||||
| 					mode, fname, sha, count, err := git.ParseTreeLine(batchReader, modeBuf, fnameBuf, workingShaBuf) | ||||
| 					mode, fname, sha20byte, count, err := git.ParseTreeLine(batchReader, modeBuf, fnameBuf, workingShaBuf) | ||||
| 					if err != nil { | ||||
| 						return nil, err | ||||
| 					} | ||||
| 					n += int64(count) | ||||
| 					sha := git.To40ByteSHA(sha20byte) | ||||
| 					if bytes.Equal(sha, []byte(hashStr)) { | ||||
| 						result := LFSResult{ | ||||
| 							Name:         curPath + string(fname), | ||||
|   | ||||
		Reference in New Issue
	
	Block a user