man-pages/man1/git-commit-graph.1.html
2021-03-31 01:06:50 +01:00

287 lines
5.3 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of GIT-COMMIT-GRAPH</TITLE>
</HEAD><BODY>
<H1>GIT-COMMIT-GRAPH</H1>
Section: Git Manual (1)<BR>Updated: 03/04/2021<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
git-commit-graph - Write and verify Git commit-graph files
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<P>
<PRE>
<I>git commit-graph verify</I> [--object-dir &lt;dir&gt;] [--shallow] [--[no-]progress]
<I>git commit-graph write</I> &lt;options&gt; [--object-dir &lt;dir&gt;] [--[no-]progress]
</PRE>
<P>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<P>
Manage the serialized commit-graph file.
<A NAME="lbAE">&nbsp;</A>
<H2>OPTIONS</H2>
<P>
--object-dir
<DL COMPACT><DT id="1"><DD>
Use given directory for the location of packfiles and commit-graph file. This parameter exists to specify the location of an alternate that only has the objects directory, not a full
<B>.git</B>
directory. The commit-graph file is expected to be in the
<B>&lt;dir&gt;/info</B>
directory and the packfiles are expected to be in
<B>&lt;dir&gt;/pack</B>.
</DL>
<P>
--[no-]progress
<DL COMPACT><DT id="2"><DD>
Turn progress on/off explicitly. If neither is specified, progress is shown if standard error is connected to a terminal.
</DL>
<A NAME="lbAF">&nbsp;</A>
<H2>COMMANDS</H2>
<P>
<I>write</I>
<DL COMPACT><DT id="3"><DD>
Write a commit-graph file based on the commits found in packfiles.
<P>
With the
<B>--stdin-packs</B>
option, generate the new commit graph by walking objects only in the specified pack-indexes. (Cannot be combined with
<B>--stdin-commits</B>
or
<B>--reachable</B>.)
<P>
With the
<B>--stdin-commits</B>
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
<B>--stdin-packs</B>
or
<B>--reachable</B>.)
<P>
With the
<B>--reachable</B>
option, generate the new commit graph by walking commits starting at all refs. (Cannot be combined with
<B>--stdin-commits</B>
or
<B>--stdin-packs</B>.)
<P>
With the
<B>--append</B>
option, include all commits that are present in the existing commit-graph file.
<P>
With the
<B>--split</B>
option, write the commit-graph as a chain of multiple commit-graph files stored in
<B>&lt;dir&gt;/info/commit-graphs</B>. The new commits not already in the commit-graph are added in a new &quot;tip&quot; file. This file is merged with the existing file if the following merge conditions are met:
<P>
<DL COMPACT><DT id="4"><DD>
&bull;
If
<B>--size-multiple=&lt;X&gt;</B>
is not specified, let
<B>X</B>
equal 2. If the new tip file would have
<B>N</B>
commits and the previous tip has
<B>M</B>
commits and
<B>X</B>
times
<B>N</B>
is greater than
<B>M</B>, instead merge the two files into a single file.
</DL>
<P>
<DL COMPACT><DT id="5"><DD>
&bull;
If
<B>--max-commits=&lt;M&gt;</B>
is specified with
<B>M</B>
a positive integer, and the new tip file would have more than
<B>M</B>
commits, then instead merge the new tip with the previous tip.
<P>
Finally, if
<B>--expire-time=&lt;datetime&gt;</B>
is not specified, let
<B>datetime</B>
be the current time. After writing the split commit-graph, delete all unused commit-graph whose modified times are older than
<B>datetime</B>.
</DL>
</DL>
<P>
<I>verify</I>
<DL COMPACT><DT id="6"><DD>
Read the commit-graph file and verify its contents against the object database. Used to check for corrupted data.
<P>
With the
<B>--shallow</B>
option, only check the tip commit-graph file in a chain of split commit-graphs.
</DL>
<A NAME="lbAG">&nbsp;</A>
<H2>EXAMPLES</H2>
<P>
<DL COMPACT><DT id="7"><DD>
&bull;
Write a commit-graph file for the packed commits in your local
<B>.git</B>
directory.
<P>
<DL COMPACT><DT id="8"><DD>
<PRE>
$ git commit-graph write
</PRE>
</DL>
<P>
</DL>
<P>
<DL COMPACT><DT id="9"><DD>
&bull;
Write a commit-graph file, extending the current commit-graph file using commits in
<B>&lt;pack-index&gt;</B>.
<P>
<DL COMPACT><DT id="10"><DD>
<PRE>
$ echo &lt;pack-index&gt; | git commit-graph write --stdin-packs
</PRE>
</DL>
<P>
</DL>
<P>
<DL COMPACT><DT id="11"><DD>
&bull;
Write a commit-graph file containing all reachable commits.
<P>
<DL COMPACT><DT id="12"><DD>
<PRE>
$ git show-ref -s | git commit-graph write --stdin-commits
</PRE>
</DL>
<P>
</DL>
<P>
<DL COMPACT><DT id="13"><DD>
&bull;
Write a commit-graph file containing all commits in the current commit-graph file along with those reachable from
<B>HEAD</B>.
<P>
<DL COMPACT><DT id="14"><DD>
<PRE>
$ git rev-parse HEAD | git commit-graph write --stdin-commits --append
</PRE>
</DL>
<P>
</DL>
<A NAME="lbAH">&nbsp;</A>
<H2>GIT</H2>
<P>
Part of the <B><A HREF="/cgi-bin/man/man2html?1+git">git</A></B>(1) suite
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="15"><A HREF="#lbAB">NAME</A><DD>
<DT id="16"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="17"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="18"><A HREF="#lbAE">OPTIONS</A><DD>
<DT id="19"><A HREF="#lbAF">COMMANDS</A><DD>
<DT id="20"><A HREF="#lbAG">EXAMPLES</A><DD>
<DT id="21"><A HREF="#lbAH">GIT</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:13 GMT, March 31, 2021
</BODY>
</HTML>