Subject: [PATCH 0/3] builtin/commit-graph.c: new split/merge options

From: Taylor Blau <[email-masked]>
Date: Thu, 30 Jan 2020 16:28:14 -0800

Hi,

Here are another few patches that came out of working on GitHub's
deployment of incremental commit-graphs. These three patches introduce
two new options: '--split[=<merge-all|no-merge>]' and
'--input=<source>'.

The former controls whether or not commit-graph's split machinery should
either write an incremental commit graph, squash the chain of
incrementals, or defer to the other options.

(This comes from GitHub's desire to have more fine-grained control over
the commit-graph chain's behavior. We run short jobs after every push
that we would like to limit the running time of, and hence we do not
want to ever merge a long chain of incrementals unless we specifically
opt into that.)

The latter of the two new options does two things:

  * It cleans up the many options that specify input sources (e.g.,
    '--stdin-commits', '--stdin-packs', '--reachable' and so on) under
    one unifying name.

  * It allows us to introduce a new argument '--input=none', to prevent
    walking each packfile when neither '--stdin-commits' nor
    '--stdin-packs' was given.

Together, these have the combined effect of being able to write the
following two new invocations:

  $ git commit-graph write --split=merge-all --input=none

  $ git commit-graph write --split=no-merge --input=stdin-packs

to (1) merge the chain, and (2) write a single new incremental.

Thanks in advance for your review, as always.

Taylor Blau (3):
  builtin/commit-graph.c: support '--split[=<strategy>]'
  builtin/commit-graph.c: introduce '--input=<source>'
  builtin/commit-graph.c: support '--input=none'

 Documentation/git-commit-graph.txt |  55 ++++++++------
 builtin/commit-graph.c             | 113 +++++++++++++++++++++++------
 commit-graph.c                     |  25 ++++---
 commit-graph.h                     |  10 ++-
 t/t5318-commit-graph.sh            |  46 ++++++------
 t/t5324-split-commit-graph.sh      |  85 +++++++++++++++++-----
 6 files changed, 239 insertions(+), 95 deletions(-)

--
2.25.0.dirty