[PATCH 1/2] for-each-repo: interpolate repo path arguments
- From
Ronan Pigott <ronan@rjp.ie>
- Date
- Nov 5, 2022, 18:45 UTC
- Message-ID
- <20221105184532.457043-2-ronan@rjp.ie>
- In-Reply-To
- <20221105184532.457043-1-ronan@rjp.ie>
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> --- builtin/for-each-repo.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/builtin/for-each-repo.c b/builtin/for-each-repo.c index d45d873f57..6aeac37148 100644 --- a/builtin/for-each-repo.c +++ b/builtin/for-each-repo.c @@ -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); }
-- 2.38.1