From: Jens Lehmann <Jens.Lehmann@web.de>
To: Duy Nguyen <pclouds@gmail.com>
Cc: Lars Hjemli <hjemli@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH v2] all: new command used for multi-repo operations
Date: Wed, 23 Jan 2013 21:17:06 +0100 [thread overview]
Message-ID: <51004542.8010708@web.de> (raw)
In-Reply-To: <CACsJy8DskoCi9Lg+HW0JeQBe4HX-bMXNHUgfrsg+DoqBN9-ntQ@mail.gmail.com>
Am 23.01.2013 09:55, schrieb Duy Nguyen:
> On Wed, Jan 23, 2013 at 3:12 PM, Lars Hjemli <hjemli@gmail.com> wrote:
>> +NAME
>> +----
>> +git-all - Execute a git command in multiple repositories
>
> I agree with Junio "git-all" is too generic.
+1
>> +static int get_repo_state()
>> +{
>> + const char *diffidx[] = {"diff", "--quiet", "--cached", NULL};
>> + const char *diffwd[] = {"diff", "--quiet", NULL};
>> +
>> + if (run_command_v_opt(diffidx, RUN_GIT_CMD) != 0)
>> + return DIRTY;
>> + if (run_command_v_opt(diffwd, RUN_GIT_CMD) != 0)
>> + return DIRTY;
>> + return CLEAN;
>> +}
>
> Perhaps we could add the subrepo's object data to the in-memory object
> database of git-all, then do the diff without launching new commands?
You could do that for the "--cached" case, but not for the plain diff.
But I think forking a "git status --porcelain -uno" and testing if it
produced any output should do the trick with a single fork.
next prev parent reply other threads:[~2013-01-23 20:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-23 8:12 [PATCH v2] all: new command used for multi-repo operations Lars Hjemli
2013-01-23 8:55 ` Duy Nguyen
2013-01-23 9:24 ` Lars Hjemli
2013-01-23 10:15 ` Duy Nguyen
2013-01-23 20:17 ` Jens Lehmann [this message]
2013-01-23 16:52 ` Junio C Hamano
2013-01-23 17:04 ` Junio C Hamano
2013-01-23 18:29 ` Lars Hjemli
2013-01-23 18:19 ` Lars Hjemli
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=51004542.8010708@web.de \
--to=jens.lehmann@web.de \
--cc=git@vger.kernel.org \
--cc=hjemli@gmail.com \
--cc=pclouds@gmail.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 NNTP newsgroup(s).