git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH RFC] diff: add SUBMODULE_DIFF format to display submodule diff

From
Stefan Beller <sbeller@google.com>
Date
Aug 9, 2016, 23:15 UTC
Message-ID
<CAGZ79kYkA=jJPHy+jqe5zVz0kM+95hxFUZPTNCKMJzbmJ7gaew@mail.gmail.com>
In-Reply-To
<CAGZ79kZbHAsxf9G-8=nz3o_zOMNFPa=kSphdo=4zLq97jycbYg@mail.gmail.com>
On Tue, Aug 9, 2016 at 4:10 PM, Stefan Beller <sbeller@google.com> wrote:
> xread does use a poll() for you so it is not active polling,
> but only reading when data is available.
s/active polling/ spinning/
Show 10 quoted lines
>
>
>>>
>>> When not checked out, we can invoke the diff command
>>> in .git/modules/<name> as that is the git dir of the submodule,
>>> i.e. operating diff with a bare repo?
>>
>> We can actually do this every time. How would you pass that in a
>> child_process? I don't think it's "dir" but instead passing
>> "--git-dir" somehow?
I think it doesn't matter. You can still use .dir.
(That would be equivalent to `cd $GIT_DIR && git diff sha1..sha1`
which works just as well, even in the submodule case)
Alternatively you could do
    argv_array_pushf(cp.env_array, "GIT_DIR=%s", ...)
So I would drop the -C here and just use the .dir attribute.
> git -C $GIT_DIR diff --relative ${superprojects ce->name}
Previous: Stefan BellerNext: Johannes Sixt
Message 6 of 7 in “diff: add SUBMODULE_DIFF format to display submodule diff”
  1. diff: add SUBMODULE_DIFF format to display submodule diffJacob Keller, Aug 9, 2016
  2. Junio C HamanoAug 9, 2016
  3. Stefan BellerAug 9, 2016
  4. Jacob KellerAug 9, 2016
  5. Stefan BellerAug 9, 2016
  6. Stefan BellerAug 9, 2016
  7. Johannes SixtAug 10, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.