Eric Bower
·
2025-08-28
tool.html
1{{template "base" .}}
2
3{{define "title"}}range-diff tool{{end}}
4
5{{define "meta"}}
6<meta property="og:title" content="range-diff tool" />
7<meta property="og:url" content="https://{{.MetaData.URL}}/tool" />
8<meta property="og:type" content="object" />
9<meta property="og:site_name" content="{{.MetaData.URL}}" />
10{{end}}
11
12{{define "body"}}
13 {{if .PatchsetData.RangeDiff}}
14 <div class="p-1">
15 {{template "range-diff" .}}
16 </div>
17 {{else}}
18 <main class="flex justify-center">
19 <div class="container mt">
20 <div>
21 <h1 class="text-xl">range-diff</h1>
22 <div>
23 A tool to compare two commit ranges (e.g. two versions of a branch) by cross-referencing similar commits and then diff'ing them.
24 This means the old patches and the new patches do not need to be in the same order.
25 You can read the <a href="https://git-scm.com/docs/git-range-diff">git <code>range-diff</code> docs</a> to learn more about it.
26 </div>
27 <div class="mb">
28 In order to use this tool, you need to print both versions of a branch by running <a href="https://git-scm.com/docs/git-format-patch">git <code>format-patch</code></a>.
29 </div>
30 <pre>git switch branch-1
31git format-patch --stdout origin/main # paste into old box
32git switch branch-2
33git format-patch --stdout origin/main # paste into new box</pre>
34 </div>
35
36 <form method="post" action="/tool" style="text-align: right;">
37 <div class="flex gap items-center">
38 <div class="flex-1" >
39 <h2 class="text-lg">old patchset</h2>
40 <textarea name="prev_patchset" style="width: 100%; height: 100vh; max-height: 500px;"></textarea>
41 </div>
42 <div>>></div>
43 <div class="flex-1" >
44 <h2 class="text-lg">new patchset</h2>
45 <textarea name="next_patchset" style="width: 100%; height: 100vh; max-height: 500px;"></textarea>
46 </div>
47 </div>
48 <button type="submit" class="btn mt" style="background-color: transparent;">submit</button>
49 </form>
50 </div>
51 </main>
52 {{end}}
53{{end}}