mbox series

[RFC,0/7] Lazy fetch with subprocess

Message ID cover.1596590295.git.jonathantanmy@google.com (mailing list archive)
Headers show
Series Lazy fetch with subprocess | expand

Message

Jonathan Tan Aug. 5, 2020, 1:20 a.m. UTC
Here's some code that performs the lazy fetch in a subprocess. It was
more involved than I thought it would be, but here it is.

My main concern is the user-facing interface for the null fetch
negotiator. It not only does not negotiate at all but affects the
everything_local() check, so I wonder if it should be exposed
differently. More information is in the commit message for the 2nd
patch.

I know that the following still needs to be done, but I thought I'd send
out the patches for early feedback first since the main design and code
is already done:

 - Commit messages
 - User-facing documentation
 - A way to prevent a promisor-remote fetch from invoking another
   promisor-remote fetch (use a file as a lock?)
 - Remove no_dependents code (fetch-pack, transport)

Jonathan Tan (7):
  fetch-pack: allow NULL negotiator->add_tip
  fetch-pack: allow NULL negotiator->known_common
  negotiator/null: add null fetch negotiator
  fetch: --stdin
  fetch: submodule config
  fetch: only populate existing_refs if needed
  promisor-remote: use subprocess to fetch

 Documentation/config/fetch.txt   |  5 +++-
 Makefile                         |  1 +
 builtin/fetch.c                  | 42 +++++++++++++++++++++++------
 fetch-negotiator.c               |  5 ++++
 fetch-pack.c                     | 23 +++++++++++-----
 negotiator/null.c                | 34 +++++++++++++++++++++++
 negotiator/null.h                |  8 ++++++
 promisor-remote.c                | 46 +++++++++++++++-----------------
 repo-settings.c                  |  2 ++
 repository.h                     |  1 +
 submodule-config.c               |  5 ++--
 t/t0410-partial-clone.sh         |  2 +-
 t/t4067-diff-partial-clone.sh    |  8 +++---
 t/t5554-null-fetch-negotiator.sh | 22 +++++++++++++++
 t/t5601-clone.sh                 |  2 +-
 15 files changed, 157 insertions(+), 49 deletions(-)
 create mode 100644 negotiator/null.c
 create mode 100644 negotiator/null.h
 create mode 100755 t/t5554-null-fetch-negotiator.sh