Thread (3 messages) flat view 3 messages, 3 authors, 2016-08-10

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

From: Jacob Keller <hidden>
Date: 2016-08-10 20:27:40

On Tue, Aug 9, 2016 at 5:53 PM, Stefan Beller [off-list ref] wrote:
This is not used any more, but the child is run directly below?
              unsigned char one[20], unsigned char two[20])
quoted
+{
Yea I meant to take it all out and forgot. Will be gone in v3.
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.
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
(Which is what you have here? I just wonder about the buffer size,
as I think reading 1 by 1 is not beneficial)
quoted
+
+       c = fgetc(diff);
+       while (c != EOF) {
+               fputc(c, f);
+               c = fgetc(diff);
+       }
+
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help