@@ -417,9 +417,9 @@ static void strbuf_worktree_gitdir(struct strbuf *buf,
417
417
strbuf_git_common_path (buf , repo , "worktrees/%s" , wt -> id );
418
418
}
419
419
420
- static void do_git_path (const struct repository * repo ,
421
- const struct worktree * wt , struct strbuf * buf ,
422
- const char * fmt , va_list args )
420
+ void repo_git_pathv (const struct repository * repo ,
421
+ const struct worktree * wt , struct strbuf * buf ,
422
+ const char * fmt , va_list args )
423
423
{
424
424
int gitdir_len ;
425
425
strbuf_worktree_gitdir (buf , repo , wt );
@@ -438,7 +438,7 @@ char *repo_git_path(const struct repository *repo,
438
438
struct strbuf path = STRBUF_INIT ;
439
439
va_list args ;
440
440
va_start (args , fmt );
441
- do_git_path (repo , NULL , & path , fmt , args );
441
+ repo_git_pathv (repo , NULL , & path , fmt , args );
442
442
va_end (args );
443
443
return strbuf_detach (& path , NULL );
444
444
}
@@ -449,7 +449,7 @@ void strbuf_repo_git_path(struct strbuf *sb,
449
449
{
450
450
va_list args ;
451
451
va_start (args , fmt );
452
- do_git_path (repo , NULL , sb , fmt , args );
452
+ repo_git_pathv (repo , NULL , sb , fmt , args );
453
453
va_end (args );
454
454
}
455
455
@@ -458,7 +458,7 @@ char *git_path_buf(struct strbuf *buf, const char *fmt, ...)
458
458
va_list args ;
459
459
strbuf_reset (buf );
460
460
va_start (args , fmt );
461
- do_git_path (the_repository , NULL , buf , fmt , args );
461
+ repo_git_pathv (the_repository , NULL , buf , fmt , args );
462
462
va_end (args );
463
463
return buf -> buf ;
464
464
}
@@ -467,7 +467,7 @@ void strbuf_git_path(struct strbuf *sb, const char *fmt, ...)
467
467
{
468
468
va_list args ;
469
469
va_start (args , fmt );
470
- do_git_path (the_repository , NULL , sb , fmt , args );
470
+ repo_git_pathv (the_repository , NULL , sb , fmt , args );
471
471
va_end (args );
472
472
}
473
473
@@ -476,7 +476,7 @@ const char *git_path(const char *fmt, ...)
476
476
struct strbuf * pathname = get_pathname ();
477
477
va_list args ;
478
478
va_start (args , fmt );
479
- do_git_path (the_repository , NULL , pathname , fmt , args );
479
+ repo_git_pathv (the_repository , NULL , pathname , fmt , args );
480
480
va_end (args );
481
481
return pathname -> buf ;
482
482
}
@@ -486,7 +486,7 @@ char *git_pathdup(const char *fmt, ...)
486
486
struct strbuf path = STRBUF_INIT ;
487
487
va_list args ;
488
488
va_start (args , fmt );
489
- do_git_path (the_repository , NULL , & path , fmt , args );
489
+ repo_git_pathv (the_repository , NULL , & path , fmt , args );
490
490
va_end (args );
491
491
return strbuf_detach (& path , NULL );
492
492
}
@@ -517,7 +517,7 @@ const char *worktree_git_path(const struct worktree *wt, const char *fmt, ...)
517
517
struct strbuf * pathname = get_pathname ();
518
518
va_list args ;
519
519
va_start (args , fmt );
520
- do_git_path (the_repository , wt , pathname , fmt , args );
520
+ repo_git_pathv (the_repository , wt , pathname , fmt , args );
521
521
va_end (args );
522
522
return pathname -> buf ;
523
523
}
0 commit comments