On Wed, Sep 15, 2021 at 4:36 PM Jeff Hostetler via GitGitGadget <gitgitgadget@xxxxxxxxx> wrote: > Add `command_len` argument to the Simple IPC API. > > In my original Simple IPC API, I assumed that the request > would always be a null-terminated string of text characters. > The command arg was just a `const char *`. > > I found a caller that would like to pass a binary command > to the daemon, so I want to ammend the Simple IPC API to s/ammend/amend/ > take `const char *command, size_t command_len` and pass > that to the daemon. (Really, the first arg should just be > a `void *` or `const unsigned byte *` to make that clearer.) The reader is left wondering why you didn't also change it to `const void *` (or one of the other choices) while at it. > Note, the response side has always been a `struct strbuf` > which includes the buffer and length, so we already support > returning a binary answer. (Yes, it feels a little weird > returning a binary buffer in a `strbuf`, but it works.) > > Signed-off-by: Jeff Hostetler <jeffhost@xxxxxxxxxxxxx>