bin/refs: Allow overwriting existing ref
Currently if you want to update a non-alias ref, you need to first check if it exists and use either `ostree refs --create` or `ostree reset` as appropriate. That's unnecessarily complicated and is much less convenient than the old `write-refs` builtin that simply called `ostree_repo_set_ref_immediate()` without any checks. Add a `--force` option to be used with `--create` that does not raise an error when the destination ref already exists. Closes: #1870 Approved by: jlebon
This commit is contained in:
1 parent
6733843f87
commit
d916383953
4 files changed
+23
-3
No files matched your search
@@ -126,6 +126,16 @@ Boston, MA 02111-1307, USA.
|
||||
PREFIX are deleted.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--force</option></term>
|
||||
|
||||
<listitem><para>
|
||||
When creating <literal>NEWREF</literal> with
|
||||
<option>--create</option>, allow an existing ref to be
|
||||
updated instead of erroring.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
|
||||
Reference in new issue
Block a user