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

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

From
Jacob Keller <jacob.keller@gmail.com>
Date
Aug 10, 2016, 06:49 UTC
Message-ID
<CA+P7+xqBU1j=0bRRSBG6VHfDDzZfzFamgObVnMgTdDaCH0ZWSg@mail.gmail.com>
In-Reply-To
<CAGZ79kYLLJCq0OZANSyrYmuq1Mm6w3Ks8CHC-_0uicDps0srpg@mail.gmail.com>
On Tue, Aug 9, 2016 at 5:53 PM, Stefan Beller <sbeller@google.com> wrote:
> This is not used any more, but the child is run directly below?
>               unsigned char one[20], unsigned char two[20])
>> +{
>
Yea I meant to take it all out and forgot. Will be gone in v3.
Show 5 quoted lines
>
> This pattern seems familar, do we have a function for that?
> (get a submodules git dir? As I was mainly working on the helper
> I do not know off hand)
>

I copied it from somewhere, I didn't see a helper. It's probably worth making one.

Show 5 quoted lines
> diff is a FILE* pointer. cp.out is a standard int file descriptor
>
> Maybe you'd want a similar thing as strbuf_getwholeline_fd()
> just instead of adding it to the strbuf, adding it to `f` ?
>
Junio has a much better suggestion in another thread, which I will use.

Thanks, Jake

Show 10 quoted lines
> (Which is what you have here? I just wonder about the buffer size,
> as I think reading 1 by 1 is not beneficial)
>
>> +
>> +       c = fgetc(diff);
>> +       while (c != EOF) {
>> +               fputc(c, f);
>> +               c = fgetc(diff);
>> +       }
>> +
Previous: Stefan BellerNext: Junio C Hamano
Message 3 of 6 in “diff: add SUBMODULE_DIFF format to display submodule diff”
  1. diff: add SUBMODULE_DIFF format to display submodule diffJacob Keller, Aug 10, 2016
  2. Stefan BellerAug 10, 2016
  3. Jacob KellerAug 10, 2016
  4. Junio C HamanoAug 10, 2016
  5. Jacob KellerAug 10, 2016
  6. Junio C HamanoAug 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.