summaryrefslogtreecommitdiff
path: root/man/ostree-rev-parse.xml
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2022-08-16 17:27:46 -0400
committerColin Walters <walters@verbum.org>2022-08-18 11:08:17 -0400
commitad0354ac36aa2e7b0497f0e1636ee0d1a2d31033 (patch)
treef127d04693bfb5b3e8d24a99d572dd98810e6be4 /man/ostree-rev-parse.xml
parentea2f0c294312240cbf1cc286bd71477d13cca89e (diff)
downloadostree-ad0354ac36aa2e7b0497f0e1636ee0d1a2d31033.tar.gz
cli/rev-parse: Add `--single` option
In the current "ostree native container" flow, we're inserting a commit object into the repo but with no refs. We have hacks in a few places to find the commit digest via e.g. `find repo/objects -name *.commit` but that's a horrible hack. Add `ostree rev-parse --single` which will print the single commit, and error out if there is not exactly one commit. Co-authored-by: Jonathan Lebon <jonathan@jlebon.com>
Diffstat (limited to 'man/ostree-rev-parse.xml')
-rw-r--r--man/ostree-rev-parse.xml13
1 files changed, 13 insertions, 0 deletions
diff --git a/man/ostree-rev-parse.xml b/man/ostree-rev-parse.xml
index 74c585fd..f39868a6 100644
--- a/man/ostree-rev-parse.xml
+++ b/man/ostree-rev-parse.xml
@@ -54,6 +54,19 @@ License along with this library. If not, see <https://www.gnu.org/licenses/>.
</refsynopsisdiv>
+ <refsect1>
+ <title>Options</title>
+ <variablelist>
+ <varlistentry>
+ <term><option>--single</option>, <option>-S</option></term>
+
+ <listitem><para>
+ If the repository has exactly one commit, then print it; any other case will result in an error.
+ </para></listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect1>
+
<!-- Is this accurate for all cases? This is what I observed -->
<refsect1>
<title>Description</title>