Skip to content

Commit 9bcd798

Browse files
authored
Merge pull request #2526 from strictdoc-project/stanislaw/diff_cli
feat(diff/changelog): add a quick shortcut to viewing HEAD^ vs HEAD and origin/main vs HEAD
2 parents 57fedac + 989abd3 commit 9bcd798

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

strictdoc/export/html/templates/screens/git/legend.jinja

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
</div>
3333

3434
<p>The Diff/Changelog query is shareable via a URL.</p>
35-
<p>Example:</p>
35+
<p>Examples:</p>
3636
<div class="sdoc-table_key_value">
3737
{# djlint:off H022 #}
3838
<a href="http://127.0.0.1:5111/diff?left_revision=HEAD&right_revision=HEAD%2B&tab=diff"
@@ -42,6 +42,24 @@
4242
Open a diff between the last commit and the existing changes to the Git tree.
4343
</div>
4444
</div>
45+
<div class="sdoc-table_key_value">
46+
{# djlint:off H022 #}
47+
<a href="http://127.0.0.1:5111/diff?left_revision=HEAD^&right_revision=HEAD&tab=diff"
48+
class="sdoc-table_key_value-key">HEAD^ vs. HEAD</a>
49+
{# djlint:on #}
50+
<div class="sdoc-table_key_value-value">
51+
Open a diff between the last commit and the commit before it.
52+
</div>
53+
</div>
54+
<div class="sdoc-table_key_value">
55+
{# djlint:off H022 #}
56+
<a href="http://127.0.0.1:5111/diff?left_revision=origin/main&right_revision=HEAD&tab=diff"
57+
class="sdoc-table_key_value-key">origin/main vs. HEAD</a>
58+
{# djlint:on #}
59+
<div class="sdoc-table_key_value-value">
60+
Open a diff between the last commit on origin/main and the last commit on the current branch.
61+
</div>
62+
</div>
4563

4664
<p>The StrictDoc diff algorithm compares documentation trees (left-hand side, LHS, and right-hand side, RHS) based on these principles:</p>
4765
<ul>

0 commit comments

Comments
 (0)