mirror of
https://github.com/martinvonz/jj.git
synced 2025-05-28 02:21:12 +00:00
Deployed 9e80d0c to prerelease with MkDocs 1.6.1 and mike 2.1.3
This commit is contained in:
parent
9c02e49cd0
commit
af72eec8be
@ -2722,11 +2722,15 @@ invocations as follows:</p>
|
||||
<h3 id="set-of-immutable-commits">Set of immutable commits<a class="headerlink" href="#set-of-immutable-commits" title="Permanent link">¶</a></h3>
|
||||
<p>You can configure the set of immutable commits via
|
||||
<code>revset-aliases."immutable_heads()"</code>. The default set of immutable heads is
|
||||
<code>builtin_immutable_heads()</code>, which in turn is defined as
|
||||
<code>present(trunk()) | tags() | untracked_remote_bookmarks()</code>. For example, to
|
||||
prevent rewriting commits on <code>main@origin</code> and commits authored by other users:</p>
|
||||
<div class="highlight"><pre><span></span><code><span class="c1"># The `main.. &` bit is an optimization to scan for non-`mine()` commits only</span>
|
||||
<span class="c1"># among commits that are not in `main`.</span>
|
||||
<span class="n">revset-aliases</span><span class="p">.</span><span class="s2">"immutable_heads()"</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"main@origin | (main@origin.. & ~mine())"</span>
|
||||
also consider the <code>maint@origin</code> bookmark immutable:</p>
|
||||
<div class="highlight"><pre><span></span><code><span class="n">revset-aliases</span><span class="p">.</span><span class="s2">"immutable_heads()"</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"builtin_immutable_heads() | maint@origin"</span>
|
||||
</code></pre></div>
|
||||
<p>To prevent rewriting commits authored by other users:</p>
|
||||
<div class="highlight"><pre><span></span><code><span class="c1"># The `trunk().. &` bit is an optimization to scan for non-`mine()` commits</span>
|
||||
<span class="c1"># only among commits that are not in `trunk()`.</span>
|
||||
<span class="n">revset-aliases</span><span class="p">.</span><span class="s2">"immutable_heads()"</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"builtin_immutable_heads() | (trunk().. & ~mine())"</span>
|
||||
</code></pre></div>
|
||||
<p>Ancestors of the configured set are also immutable. The root commit is always
|
||||
immutable even if the set is empty.</p>
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user