git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Jeff Hostetler via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Jeff Hostetler <jeffhost@microsoft.com>
Subject: [PATCH 0/8] Simple IPC Cleanups
Date: Thu, 04 Mar 2021 20:17:19 +0000	[thread overview]
Message-ID: <pull.893.git.1614889047.gitgitgadget@gmail.com> (raw)

This patch series adds a few final cleanup and refactoring commits onto the
jh/simple-ipc branch. These are in response to mailing list comments that I
received on my V4 version after it was queued into next.

https://lore.kernel.org/git/pull.766.v4.git.1613598529.gitgitgadget@gmail.com/T/#mbd1da5ff93ef273049090f697aeab68c74f698f1

There are a couple of large changes that I'll call out here.

In the third commit, I moved the new lock-aware code out of unix-socket.c
and into its own source file. This creates a slightly misleading diff at
times (in gitk) where it looks like 51% copy of unix-socket.c rather than a
new file. On the command line and on GitHub it looks better.

In the commits prefixed with test-simple-ipc: ... I refactored the options
parsing to allow the name of the socket/named-pipe to be passed on the
command line so that the Windows version could do so (since it needs to exec
a child rather than fork). This turned into a larger cleanup/refactoring
than I had expected, but I think the result is much better. I unified all of
the option parsing into the main cmd__simple_ipc() function and got rid of
the smaller parsers inside of each subcommand. With this, all of the
subcommands now allow an alternate socket path to be used. (Just fixing the
unused arg on the Windows side would allow us to spawn a background daemon
on a different socket, but none of the client subcommands would be able to
talk to it.)

Jeff Hostetler (8):
  pkt-line: remove buffer arg from write_packetized_from_fd_no_flush()
  unix-socket: simplify initialization of unix_stream_listen_opts
  unix-stream-server: create unix-stream-server.c
  simple-ipc: move error handling up a level
  unix-stream-server: add st_dev and st_mode to socket stolen checks
  test-simple-ipc: refactor command line option processing in helper
  test-simple-ipc: add --token=<token> string option
  simple-ipc: update design documentation with more details

 Documentation/technical/api-simple-ipc.txt | 131 +++++++--
 Makefile                                   |   1 +
 compat/simple-ipc/ipc-unix-socket.c        |  49 ++--
 compat/simple-ipc/ipc-win32.c              |  14 +-
 contrib/buildsystems/CMakeLists.txt        |   2 +-
 convert.c                                  |   7 +-
 pkt-line.c                                 |  19 +-
 pkt-line.h                                 |   6 +-
 simple-ipc.h                               |   4 +
 t/helper/test-simple-ipc.c                 | 326 +++++++++++----------
 t/t0052-simple-ipc.sh                      |  10 +-
 unix-socket.c                              | 117 +-------
 unix-socket.h                              |  33 +--
 unix-stream-server.c                       | 130 ++++++++
 unix-stream-server.h                       |  35 +++
 15 files changed, 502 insertions(+), 382 deletions(-)
 create mode 100644 unix-stream-server.c
 create mode 100644 unix-stream-server.h


base-commit: edce16a37ab87513a3f0bc805e9bf372bdd02961
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-893%2Fjeffhostetler%2Fnext-simple-ipc-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-893/jeffhostetler/next-simple-ipc-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/893
-- 
gitgitgadget

             reply	other threads:[~2021-03-04 20:21 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-04 20:17 Jeff Hostetler via GitGitGadget [this message]
2021-03-04 20:17 ` [PATCH 1/8] pkt-line: remove buffer arg from write_packetized_from_fd_no_flush() Jeff Hostetler via GitGitGadget
2021-03-04 22:55   ` Junio C Hamano
2021-03-04 20:17 ` [PATCH 2/8] unix-socket: simplify initialization of unix_stream_listen_opts Jeff Hostetler via GitGitGadget
2021-03-04 23:12   ` Junio C Hamano
2021-03-04 20:17 ` [PATCH 3/8] unix-stream-server: create unix-stream-server.c Jeff Hostetler via GitGitGadget
2021-03-04 20:17 ` [PATCH 4/8] simple-ipc: move error handling up a level Jeff Hostetler via GitGitGadget
2021-03-04 20:17 ` [PATCH 5/8] unix-stream-server: add st_dev and st_mode to socket stolen checks Jeff Hostetler via GitGitGadget
2021-03-06 11:42   ` René Scharfe
2021-03-08 14:14     ` Jeff Hostetler
2021-03-04 20:17 ` [PATCH 6/8] test-simple-ipc: refactor command line option processing in helper Jeff Hostetler via GitGitGadget
2021-03-04 20:17 ` [PATCH 7/8] test-simple-ipc: add --token=<token> string option Jeff Hostetler via GitGitGadget
2021-03-04 20:17 ` [PATCH 8/8] simple-ipc: update design documentation with more details Jeff Hostetler via GitGitGadget
2021-03-05  0:24 ` [PATCH 0/8] Simple IPC Cleanups Junio C Hamano
2021-03-05 21:34   ` Jeff Hostetler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=pull.893.git.1614889047.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jeffhost@microsoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).