@@ -39,7 +39,7 @@ def scan_repository(context: click.Context, path, branch):
3939 try :
4040 logger .debug ('Starting repository scan process, %s' , {'path' : path , 'branch' : branch })
4141 documents_to_scan = [
42- Document (get_path_by_os (obj .path ), obj .data_stream .read ().decode ('utf-8' , errors = 'replace' ))
42+ Document (get_path_by_os (os . path . join ( path , obj .path ) ), obj .data_stream .read ().decode ('utf-8' , errors = 'replace' ))
4343 for obj
4444 in get_git_repository_tree_file_entries (path , branch )]
4545 documents_to_scan = exclude_irrelevant_documents_to_scan (context , documents_to_scan )
@@ -82,12 +82,13 @@ def scan_commit_range(context: click.Context, path: str, commit_range: str):
8282 parent = commit .parents [0 ] if commit .parents else NULL_TREE
8383 diff = commit .diff (parent , create_patch = True , R = True )
8484 for blob in diff :
85- doc = Document (get_path_by_os (get_diff_file_path (blob )),
85+ doc = Document (get_path_by_os (os . path . join ( path , get_diff_file_path (blob ) )),
8686 blob .diff .decode ('utf-8' , errors = 'replace' ), True , commit_id )
8787 documents_to_scan .append (doc )
8888
8989 documents_to_scan = exclude_irrelevant_documents_to_scan (context , documents_to_scan )
90- logger .debug ('Found all relevant files for scanning %s' , {'path' : path , 'commit_range' : commit_range })
90+ logger .debug ('Found all relevant files in commit %s' ,
91+ {'path' : path , 'commit_range' : commit_range , 'commit_id' : commit_id })
9192 return scan_documents (context , documents_to_scan , is_git_diff = True , is_commit_range = True )
9293
9394
0 commit comments