@@ -541,8 +541,9 @@ static int fill_blob_sha1_and_mode(struct repository *r,
541541 * We have an origin -- check if the same path exists in the
542542 * parent and return an origin structure to represent it.
543543 */
544- static struct blame_origin * find_origin (struct commit * parent ,
545- struct blame_origin * origin )
544+ static struct blame_origin * find_origin (struct repository * r ,
545+ struct commit * parent ,
546+ struct blame_origin * origin )
546547{
547548 struct blame_origin * porigin ;
548549 struct diff_options diff_opts ;
@@ -562,7 +563,7 @@ static struct blame_origin *find_origin(struct commit *parent,
562563 * and origin first. Most of the time they are the
563564 * same and diff-tree is fairly efficient about this.
564565 */
565- diff_setup ( & diff_opts );
566+ repo_diff_setup ( r , & diff_opts );
566567 diff_opts .flags .recursive = 1 ;
567568 diff_opts .detect_rename = 0 ;
568569 diff_opts .output_format = DIFF_FORMAT_NO_OUTPUT ;
@@ -629,14 +630,15 @@ static struct blame_origin *find_origin(struct commit *parent,
629630 * We have an origin -- find the path that corresponds to it in its
630631 * parent and return an origin structure to represent it.
631632 */
632- static struct blame_origin * find_rename (struct commit * parent ,
633- struct blame_origin * origin )
633+ static struct blame_origin * find_rename (struct repository * r ,
634+ struct commit * parent ,
635+ struct blame_origin * origin )
634636{
635637 struct blame_origin * porigin = NULL ;
636638 struct diff_options diff_opts ;
637639 int i ;
638640
639- diff_setup ( & diff_opts );
641+ repo_diff_setup ( r , & diff_opts );
640642 diff_opts .flags .recursive = 1 ;
641643 diff_opts .detect_rename = DIFF_DETECT_RENAME ;
642644 diff_opts .output_format = DIFF_FORMAT_NO_OUTPUT ;
@@ -1260,7 +1262,7 @@ static void find_copy_in_parent(struct blame_scoreboard *sb,
12601262 if (!unblamed )
12611263 return ; /* nothing remains for this target */
12621264
1263- diff_setup ( & diff_opts );
1265+ repo_diff_setup ( sb -> repo , & diff_opts );
12641266 diff_opts .flags .recursive = 1 ;
12651267 diff_opts .output_format = DIFF_FORMAT_NO_OUTPUT ;
12661268
@@ -1442,7 +1444,7 @@ static void pass_blame(struct blame_scoreboard *sb, struct blame_origin *origin,
14421444 * common cases, then we look for renames in the second pass.
14431445 */
14441446 for (pass = 0 ; pass < 2 - sb -> no_whole_file_rename ; pass ++ ) {
1445- struct blame_origin * (* find )(struct commit * , struct blame_origin * );
1447+ struct blame_origin * (* find )(struct repository * , struct commit * , struct blame_origin * );
14461448 find = pass ? find_rename : find_origin ;
14471449
14481450 for (i = 0 , sg = first_scapegoat (revs , commit , sb -> reverse );
@@ -1455,7 +1457,7 @@ static void pass_blame(struct blame_scoreboard *sb, struct blame_origin *origin,
14551457 continue ;
14561458 if (parse_commit (p ))
14571459 continue ;
1458- porigin = find (p , origin );
1460+ porigin = find (sb -> repo , p , origin );
14591461 if (!porigin )
14601462 continue ;
14611463 if (!oidcmp (& porigin -> blob_oid , & origin -> blob_oid )) {
0 commit comments