for-each-repo: interpolate repo path arguments
This is a quality of life change for git-maintenance, so repos can be recorded with the tilde syntax. The register subcommand will not record repos in this format by default. Signed-off-by: Ronan Pigott <ronan@rjp.ie> Signed-off-by: Taylor Blau <me@ttaylorr.com>
This commit is contained in:
committed by
Taylor Blau
parent
3b08839926
commit
13d5bbdf72
@@ -14,13 +14,16 @@ static int run_command_on_repo(const char *path, int argc, const char ** argv)
|
||||
{
|
||||
int i;
|
||||
struct child_process child = CHILD_PROCESS_INIT;
|
||||
char *abspath = interpolate_path(path, 0);
|
||||
|
||||
child.git_cmd = 1;
|
||||
strvec_pushl(&child.args, "-C", path, NULL);
|
||||
strvec_pushl(&child.args, "-C", abspath, NULL);
|
||||
|
||||
for (i = 0; i < argc; i++)
|
||||
strvec_push(&child.args, argv[i]);
|
||||
|
||||
free(abspath);
|
||||
|
||||
return run_command(&child);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user