From: Ronan Pigott <ronan@rjp.ie>
To: git@vger.kernel.org
Cc: Derrick Stolee <derrickstolee@github.com>,
Andrzej Hunt <ajrhunt@google.com>,
Junio C Hamano <gitster@pobox.com>,
Andrzej Hunt <andrzej@ahunt.org>
Subject: [PATCH 1/2] for-each-repo: interpolate repo path arguments
Date: Sat, 5 Nov 2022 11:45:31 -0700 [thread overview]
Message-ID: <20221105184532.457043-2-ronan@rjp.ie> (raw)
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
next prev parent reply other threads:[~2022-11-05 18:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-05 18:45 [PATCH 0/2] git-maintenance quality-of-life improvements Ronan Pigott
2022-11-05 18:45 ` Ronan Pigott [this message]
2022-11-06 0:30 ` [PATCH 1/2] for-each-repo: interpolate repo path arguments Taylor Blau
2022-11-07 20:46 ` Derrick Stolee
2022-11-05 18:45 ` [PATCH 2/2] maintenance: add option to register in a specific config Ronan Pigott
2022-11-06 0:28 ` Taylor Blau
2022-11-06 0:42 ` Taylor Blau
2022-11-07 20:49 ` Derrick Stolee
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221105184532.457043-2-ronan@rjp.ie \
--to=ronan@rjp.ie \
--cc=ajrhunt@google.com \
--cc=andrzej@ahunt.org \
--cc=derrickstolee@github.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).