On 9/11/2018 1:22 AM, Christian Couder wrote:
On Wed, Jun 27, 2018 at 3:24 PM, Derrick Stolee <stolee@xxxxxxxxx> wrote:
When writing commit-graph files, it can be convenient to ask for all
reachable commits (starting at the ref set) in the resulting file. This
is particularly helpful when writing to stdin is complicated, such as a
future integration with 'git gc'.
It would be nice if the "Future Work" section of
Documentation/technical/commit-graph.txt had something about
integration with 'git gc'.
Hi Christian,
I'm a bit confused about this statement, because at the point in time of
this patch we had a spot in the "Future Work" section about
automatically updating the graph _somewhere_. The "future integration
with 'git gc'" I refer to in this patch is implemented in PATCH 21/22.
In PATCH 22/22 we removed this section from the technical doc:
-
-- The current design uses the 'commit-graph' subcommand to generate the graph.
- When this feature stabilizes enough to recommend to most users, we should
- add automatic graph writes to common operations that create many commits.
- For example, one could compute a graph on 'clone', 'fetch', or 'repack'
- commands.
-
Now that this feature is shipped in Git 2.19.0, this no longer belongs
in "Future Work".
With the `--stdin-commits` option, generate the new commit graph by
walking commits starting at the commits specified in stdin as a list
of OIDs in hex, one OID per line. (Cannot be combined with
---stdin-packs.)
+`--stdin-packs` or `--reachable`.)
++
+With the `--reachable` option, generate the new commit graph by walking
+commits starting at all refs. (Cannot be combined with `--stdin-commits`
+or `--stdin-packs`.)
+
With the `--append` option, include all commits that are present in the
existing commit-graph file.
The "EXAMPLES" section still contains:
* Write a graph file containing all reachable commits.
+
------------------------------------------------
$ git show-ref -s | git commit-graph write --stdin-commits
------------------------------------------------
I wonder if this should have been changed to use `--reachable`.
Thanks!
This is a good idea. I can work on that.
Thanks,
-Stolee