mirror of
				https://codeberg.org/forgejo/forgejo.git
				synced 2025-10-31 06:21:11 +00:00 
			
		
		
		
	Backport #22244. Fix #13485. Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
		
					parent
					
						
							
								9b4da56963
							
						
					
				
			
			
				commit
				
					
						e9bc2c77c3
					
				
			
		
					 19 changed files with 68 additions and 23 deletions
				
			
		|  | @ -50,7 +50,7 @@ func GetTreeBySHA(ctx context.Context, repo *repo_model.Repository, gitRepo *git | |||
| 	copy(treeURL[apiURLLen:], "/git/trees/") | ||||
| 
 | ||||
| 	// 40 is the size of the sha1 hash in hexadecimal format. | ||||
| 	copyPos := len(treeURL) - 40 | ||||
| 	copyPos := len(treeURL) - git.SHAFullLength | ||||
| 
 | ||||
| 	if perPage <= 0 || perPage > setting.API.DefaultGitTreesPerPage { | ||||
| 		perPage = setting.API.DefaultGitTreesPerPage | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue