1
0
mirror of https://github.com/git/git.git synced 2024-09-24 09:01:47 +02:00
git/compat
Jeff Hostetler a3e2033e04 simple-ipc: preparations for supporting binary messages.
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`
argument was just a `const char *`.

I found a caller that would like to pass a binary command to the
daemon, so I am amending the Simple IPC API to receive `const char
*command, size_t command_len` arguments.

I considered changing the `command` argument to be a `void *`, but the
IPC layer simply passes it to the pkt-line layer which takes a `const
char *`, so to avoid confusion I left it as is.

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@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-09-20 08:57:58 -07:00
..
linux
nedmalloc
poll
regex
simple-ipc simple-ipc: preparations for supporting binary messages. 2021-09-20 08:57:58 -07:00
stub
vcbuild
win32
access.c
apple-common-crypto.h
basename.c
bswap.h
compiler.h
fileno.c
fopen.c
hstrerror.c
inet_ntop.c
inet_pton.c
memmem.c
mingw.c
mingw.h
mkdir.c
mkdtemp.c
mmap.c
msvc.c
msvc.h
obstack.c
obstack.h
open.c
pread.c
precompose_utf8.c
precompose_utf8.h
qsort_s.c
setenv.c
sha1-chunked.c
sha1-chunked.h
snprintf.c
stat.c
strcasestr.c
strdup.c
strlcpy.c
strtoimax.c
strtoumax.c
terminal.c
terminal.h
unsetenv.c
win32.h
win32mmap.c
winansi.c