mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-04 05:18:25 +00:00 
			
		
		
		
	Update code.gitea.io/git
Signed-off-by: Jonas Franz <info@jonasfranz.software>
This commit is contained in:
		
							
								
								
									
										4
									
								
								vendor/code.gitea.io/git/repo_blame.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								vendor/code.gitea.io/git/repo_blame.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -8,12 +8,12 @@ import "fmt"
 | 
			
		||||
 | 
			
		||||
// FileBlame return the Blame object of file
 | 
			
		||||
func (repo *Repository) FileBlame(revision, path, file string) ([]byte, error) {
 | 
			
		||||
	return NewCommand("blame", "--root", file).RunInDirBytes(path)
 | 
			
		||||
	return NewCommand("blame", "--root", "--", file).RunInDirBytes(path)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// LineBlame returns the latest commit at the given line
 | 
			
		||||
func (repo *Repository) LineBlame(revision, path, file string, line uint) (*Commit, error) {
 | 
			
		||||
	res, err := NewCommand("blame", fmt.Sprintf("-L %d,%d", line, line), "-p", revision, file).RunInDir(path)
 | 
			
		||||
	res, err := NewCommand("blame", fmt.Sprintf("-L %d,%d", line, line), "-p", revision, "--", file).RunInDir(path)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user