1<!doctype html>
2<html lang="en">
3<head>
4<meta charset="utf-8">
5<meta name="viewport" content="width=device-width, initial-scale=1">
6<meta name="color-scheme" content="light dark">
7<title>SHA7 add evil.go · diffs · example.test</title>
8<meta name="theme-color" media="(prefers-color-scheme: light)" content="#ffffff">
9<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#0c0c0c">
10<meta name="apple-mobile-web-app-title" content="ermite">
11<link rel="icon" type="image/svg+xml" href="/-/static/img/icon.HASH.svg">
12<link rel="apple-touch-icon" href="/-/static/app/apple-touch-icon.HASH.png">
13<link rel="manifest" href="/-/static/app/manifest.HASH.webmanifest">
14<link rel="preload" href="/-/static/fonts/atkinson-next.HASH.woff2" as="font" type="font/woff2" crossorigin>
15<link rel="stylesheet" href="/-/static/css/ermite.HASH.css">
16<meta name="htmx-config" content='{"history":false,"includeIndicatorCSS":false,"extensions":"sse, hx-live"}'>
17<script src="/-/static/js/htmx.min.HASH.js" defer>
18</script>
19<script src="/-/static/js/hx-live.min.HASH.js" defer>
20</script>
21<script src="/-/static/js/hx-sse.min.HASH.js" defer>
22</script>
23<script src="/-/static/js/ermite.HASH.js" defer>
24</script>
25<script src="/-/static/js/files.HASH.js" defer>
26</script>
27<script src="/-/static/js/passkey.HASH.js" defer>
28</script>
29<script src="/-/static/js/log.HASH.js" defer>
30</script>
31</head>
32<body data-ref="" data-sha="SHA40" data-sel="" data-nav="" data-paths="/diffs/paths/SHA40" data-blob="/diffs/blob/SHA40">
33<a class="skip" href="#main">skip to content</a>
34<header class="hdr">
35<div class="hdr-top">
36<a class="brand" href="/" data-g="h" aria-label="home" title="home (g h)">
37<span class="brand-mark" aria-hidden="true">
38</span>
39</a>
40<nav class="crumbs" aria-label="Path">
41<ol>
42<li>
43<a href="/diffs">diffs</a>
44</li>
45<li>
46<a href="/diffs/commits/main">commit</a>
47</li>
48<li>
49<span aria-current="page">SHA7</span>
50</li>
51</ol>
52</nav>
53<div class="hdr-acts">
54<a class="btn ref" href="/diffs/refs" data-fire="refs" aria-keyshortcuts="b" title="switch branch or tag (b)">
55<span class="ico i-branch" aria-hidden="true">
56</span>
57<span class="ref-name">detached</span>
58<span class="sha">SHA7</span>
59</a>
60<button type="button" class="btn search" data-js aria-haspopup="dialog" aria-controls="panel-cmd" aria-keyshortcuts="Control+K :" title="go to a section, ref, file or repo (ctrl k or :)" data-fire="cmd">
61<span class="ico i-search" aria-hidden="true">
62</span>
63<span class="search-label">Go to…</span>
64<kbd aria-hidden="true">ctrl k</kbd>
65</button>
66<button type="button" class="btn icon" data-install hidden aria-label="Install app" title="install ermite as an app">
67<span class="ico i-download" aria-hidden="true">
68</span>
69</button>
70</div>
71</div>
72<nav class="tabs" aria-label="Sections">
73<ul>
74<li>
75<a href="/diffs" data-key="s" aria-keyshortcuts="s">Summary <kbd aria-hidden="true">s</kbd>
76</a>
77</li>
78<li>
79<a href="/diffs/tree/main" data-key="t" aria-keyshortcuts="t">Files <kbd aria-hidden="true">t</kbd>
80</a>
81</li>
82<li>
83<a href="/diffs/commits/main" data-key="c" aria-keyshortcuts="c" aria-current="page">Commits <kbd aria-hidden="true">c</kbd>
84</a>
85</li>
86<li>
87<a href="/diffs/refs" data-key="r" aria-keyshortcuts="r">Branches & tags <kbd aria-hidden="true">r</kbd>
88</a>
89</li>
90<li>
91<a href="/diffs/merge-requests" data-key="m" aria-keyshortcuts="m">Merge requests <kbd aria-hidden="true">m</kbd>
92</a>
93</li>
94<li>
95<a href="/diffs/actions" data-key="a" aria-keyshortcuts="a">Actions <kbd aria-hidden="true">a</kbd>
96</a>
97</li>
98</ul>
99</nav>
100</header>
101<div class="work has-rail">
102<main id="main" tabindex="-1">
103<header class="show">
104<h1>add evil.go</h1>
105<pre class="msg">looks <U+202E>fine<U+202C></pre>
106<dl class="kv show-kv">
107<dt>commit</dt>
108<dd>SHA40</dd>
109<dt>author</dt>
110<dd>T · <time datetime="STAMP" title="STAMP">AGO</time> · STAMP</dd>
111<dt>parent</dt>
112<dd>
113<a href="/diffs/commit/SHA40">SHA7</a>
114</dd>
115</dl>
116</header>
117<div class="diff-tools" role="group" aria-label="Diff view">
118<span class="dim">1 file · <span class="plus">+8</span>
119<span class="minus">-0</span>
120</span>
121<span class="grow">
122</span>
123<a href="/diffs/commit/SHA40?view=unified" class="btn vbtn" data-view="unified" aria-keyshortcuts="u" aria-current="true" data-fire="unified" :aria-current="q('#diffs').attr['data-diff'] === this.dataset.view ? 'true' : false">Unified<kbd aria-hidden="true">u</kbd>
124</a>
125<a href="/diffs/commit/SHA40?view=split" class="btn vbtn" data-view="split" aria-keyshortcuts="d" data-fire="split" :aria-current="q('#diffs').attr['data-diff'] === this.dataset.view ? 'true' : false">Split<kbd aria-hidden="true">d</kbd>
126</a>
127<button type="button" aria-keyshortcuts="x" data-js data-fire="collapse" class="btn">
128<span hx-live="this.textContent = q('[data-file][open]').count || !q('[data-file]').count ? 'Collapse all' : 'Expand all'">Collapse all</span>
129<kbd aria-hidden="true">x</kbd>
130</button>
131</div>
132<p class="notice">this diff holds invisible characters (direction controls, zero-width characters). They are shown as <span class="inv"><U+XXXX></span> markers, never applied.</p>
133<div id="diffs" data-diff="unified" hx-live="this.dataset.diff = sessionStorage.getItem('diff') || this.dataset.diff">
134<details class="dfile lnw-2" id="f1" data-file open>
135<summary>
136<span class="st">A</span>
137<span class="p">evil.go</span>
138<span class="plus">+8</span>
139<span class="minus">-0</span>
140</summary>
141<div class="dscroll">
142<table class="dt uni" aria-label="evil.go, unified">
143<tbody>
144<tr class="hunk">
145<td colspan="4">@@ -0,0 +1,8 @@</td>
146</tr>
147<tr class="add">
148<td class="ln">
149</td>
150<td class="ln">1</td>
151<td class="m">+</td>
152<td class="tx">package evil</td>
153</tr>
154<tr class="add">
155<td class="ln">
156</td>
157<td class="ln">2</td>
158<td class="m">+</td>
159<td class="tx">
160</td>
161</tr>
162<tr class="add">
163<td class="ln">
164</td>
165<td class="ln">3</td>
166<td class="m">+</td>
167<td class="tx">func admin(user string) bool {</td>
168</tr>
169<tr class="add">
170<td class="ln">
171</td>
172<td class="ln">4</td>
173<td class="m">+</td>
174<td class="tx"> if user == "user<span class="inv" title="invisible character"><U+202E></span>
175<span class="inv" title="invisible character"><U+2066></span>// check<span class="inv" title="invisible character"><U+2069></span>
176<span class="inv" title="invisible character"><U+2066></span>" {</td>
177</tr>
178<tr class="add">
179<td class="ln">
180</td>
181<td class="ln">5</td>
182<td class="m">+</td>
183<td class="tx"> return true // z<span class="inv" title="invisible character"><U+200B></span>w</td>
184</tr>
185<tr class="add">
186<td class="ln">
187</td>
188<td class="ln">6</td>
189<td class="m">+</td>
190<td class="tx"> }</td>
191</tr>
192<tr class="add">
193<td class="ln">
194</td>
195<td class="ln">7</td>
196<td class="m">+</td>
197<td class="tx"> return false</td>
198</tr>
199<tr class="add">
200<td class="ln">
201</td>
202<td class="ln">8</td>
203<td class="m">+</td>
204<td class="tx">}</td>
205</tr>
206</tbody>
207</table>
208<table class="dt spl" aria-label="evil.go, split">
209<colgroup>
210<col class="c-ln">
211<col class="c-m">
212<col>
213<col class="c-ln">
214<col class="c-m">
215<col>
216</colgroup>
217<tbody>
218<tr class="hunk">
219<td colspan="6">@@ -0,0 +1,8 @@</td>
220</tr>
221<tr>
222<td class="ln none">
223</td>
224<td class="m none">
225</td>
226<td class="tx none">
227</td>
228<td class="ln add">1</td>
229<td class="m add">+</td>
230<td class="tx add">package evil</td>
231</tr>
232<tr>
233<td class="ln none">
234</td>
235<td class="m none">
236</td>
237<td class="tx none">
238</td>
239<td class="ln add">2</td>
240<td class="m add">+</td>
241<td class="tx add">
242</td>
243</tr>
244<tr>
245<td class="ln none">
246</td>
247<td class="m none">
248</td>
249<td class="tx none">
250</td>
251<td class="ln add">3</td>
252<td class="m add">+</td>
253<td class="tx add">func admin(user string) bool {</td>
254</tr>
255<tr>
256<td class="ln none">
257</td>
258<td class="m none">
259</td>
260<td class="tx none">
261</td>
262<td class="ln add">4</td>
263<td class="m add">+</td>
264<td class="tx add"> if user == "user<span class="inv" title="invisible character"><U+202E></span>
265<span class="inv" title="invisible character"><U+2066></span>// check<span class="inv" title="invisible character"><U+2069></span>
266<span class="inv" title="invisible character"><U+2066></span>" {</td>
267</tr>
268<tr>
269<td class="ln none">
270</td>
271<td class="m none">
272</td>
273<td class="tx none">
274</td>
275<td class="ln add">5</td>
276<td class="m add">+</td>
277<td class="tx add"> return true // z<span class="inv" title="invisible character"><U+200B></span>w</td>
278</tr>
279<tr>
280<td class="ln none">
281</td>
282<td class="m none">
283</td>
284<td class="tx none">
285</td>
286<td class="ln add">6</td>
287<td class="m add">+</td>
288<td class="tx add"> }</td>
289</tr>
290<tr>
291<td class="ln none">
292</td>
293<td class="m none">
294</td>
295<td class="tx none">
296</td>
297<td class="ln add">7</td>
298<td class="m add">+</td>
299<td class="tx add"> return false</td>
300</tr>
301<tr>
302<td class="ln none">
303</td>
304<td class="m none">
305</td>
306<td class="tx none">
307</td>
308<td class="ln add">8</td>
309<td class="m add">+</td>
310<td class="tx add">}</td>
311</tr>
312</tbody>
313</table>
314</div>
315</details>
316</div>
317</main>
318<aside class="rail" aria-label="Context">
319<section aria-labelledby="r-files">
320<h2 id="r-files">Files <span class="count">1</span>
321</h2>
322<ol class="files" aria-label="Changed files">
323<li>
324<a href="#f1" title="evil.go" hx-on:click="(window.ermiteMR?.openFile || ermite.openFile)(this.hash.slice(1))">
325<span class="st" data-st="A" title="added">A</span>
326<span class="nm">
327<span class="p">evil.go</span>
328<span class="d">
329<bdi>
330</bdi>
331</span>
332</span>
333<span class="n">
334<span class="plus">+8</span>
335<span class="minus">-0</span>
336</span>
337</a>
338</li>
339</ol>
340</section>
341</aside>
342</div>
343<footer class="foot">
344<span>ermite devel</span>
345<a href="http://example.test/ermite" rel="noopener" title="source of this version (AGPL-3.0-or-later)">source</a>
346<button type="button" class="foot-keys" data-js data-fire="help" aria-haspopup="dialog" aria-controls="panel-help" aria-keyshortcuts="?">
347<kbd aria-hidden="true">?</kbd> keyboard shortcuts</button>
348</footer>
349<div class="hint" role="status" aria-live="polite">
350<span class="hint-nav" :text="document.body.dataset.nav || ''">
351</span>
352<span class="hint-sel" :text="document.body.dataset.sel ? document.body.dataset.sel + ' · y permalink' : ''">
353</span>
354<span class="hint-flash" :text="document.body.dataset.flash || ''">
355</span>
356</div>
357<dialog id="panel-help" class="panel modal" aria-label="Keyboard shortcuts" hx-on:keydown="event.key === 'Escape' && (event.preventDefault(), this.close())" hx-on:click="event.target === this && this.close()">
358<div class="panel-head">
359<h2>Keyboard shortcuts</h2>
360<button type="button" class="panel-x" aria-label="Close" hx-on:click="closest('dialog').close()">
361<kbd>esc</kbd> close</button>
362</div>
363<div class="keys-pref">
364<label>
365<input type="checkbox" id="keys-off" aria-describedby="keys-note" hx-on:change="ermite.setKeysOff(this.checked)"> Turn off single-key shortcuts</label>
366<p id="keys-note" class="dim">Single-key shortcuts are on. ctrl k and esc work whatever this says.</p>
367</div>
368<dl class="keys">
369<div>
370<dt>
371<kbd>ctrl k</kbd>
372<kbd>:</kbd>
373</dt>
374<dd>go to a section, branch, tag, file or repository</dd>
375</div>
376<div>
377<dt>
378<kbd>?</kbd>
379</dt>
380<dd>this list</dd>
381</div>
382<div>
383<dt>
384<kbd>j</kbd>
385<kbd>k</kbd>
386</dt>
387<dd>move the row cursor down / up</dd>
388</div>
389<div>
390<dt>
391<kbd>enter</kbd>
392</dt>
393<dd>open the row under the cursor; on Files, a directory opens or closes in place</dd>
394</div>
395<div>
396<dt>
397<kbd>↑</kbd>
398<kbd>↓</kbd>
399<kbd>←</kbd>
400<kbd>→</kbd>
401<kbd>home</kbd>
402<kbd>end</kbd>
403</dt>
404<dd>in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file</dd>
405</div>
406<div>
407<dt>
408<kbd>l</kbd>
409<kbd>h</kbd>
410</dt>
411<dd>on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls</dd>
412</div>
413<div>
414<dt>
415<kbd>g g</kbd>
416<kbd>G</kbd>
417</dt>
418<dd>first / last row</dd>
419</div>
420<div>
421<dt>
422<kbd>/</kbd>
423</dt>
424<dd>filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)</dd>
425</div>
426<div>
427<dt>
428<kbd>b</kbd>
429</dt>
430<dd>switch branch or tag</dd>
431</div>
432<div>
433<dt>
434<kbd>s</kbd>
435<kbd>t</kbd>
436<kbd>c</kbd>
437<kbd>r</kbd>
438<kbd>m</kbd>
439</dt>
440<dd>tabs: summary, files, commits, branches & tags, merge requests</dd>
441</div>
442<div>
443<dt>
444<kbd>g h</kbd>
445</dt>
446<dd>home</dd>
447</div>
448<div>
449<dt>
450<kbd>y</kbd>
451</dt>
452<dd>copy a permalink pinned to the commit</dd>
453</div>
454<div>
455<dt>
456<kbd>d</kbd>
457<kbd>u</kbd>
458<kbd>x</kbd>
459</dt>
460<dd>diff: split / unified / collapse or expand all</dd>
461</div>
462<div>
463<dt>
464<kbd>e</kbd>
465<kbd>E</kbd>
466</dt>
467<dd>diff: the whole file in view / every file, with the lines the hunks hide</dd>
468</div>
469<div>
470<dt>
471<kbd>n</kbd>
472</dt>
473<dd>merge request: next note in the diff</dd>
474</div>
475<div>
476<dt>
477<kbd>esc</kbd>
478</dt>
479<dd>close a dialog, leave a field</dd>
480</div>
481</dl>
482</dialog>
483<dialog id="panel-refs" class="panel modal" aria-label="Switch ref" hx-on:keydown="event.key === 'Escape' && (event.preventDefault(), this.close())" hx-on:click="event.target === this && this.close()">
484<div class="panel-head">
485<label for="refs-filter" class="sr">filter branches and tags</label>
486<input id="refs-filter" type="search" placeholder="Switch branch or tag…" autocomplete="off" data-pick="#panel-refs li" hx-on:input="ermite.filter(this)">
487<button type="button" class="panel-x" aria-label="Close" hx-on:click="closest('dialog').close()">
488<kbd>esc</kbd>
489</button>
490</div>
491<div class="panel-cols" data-picklist>
492<section aria-label="Branches">
493<h2>Branches <span class="count">2</span>
494</h2>
495<ul>
496<li>
497<a href="/diffs/tree/main">
498<span class="mark" aria-hidden="true"> </span>main</a>
499</li>
500<li>
501<a href="/diffs/tree/side">
502<span class="mark" aria-hidden="true"> </span>side</a>
503</li>
504</ul>
505</section>
506<section aria-label="Tags">
507<h2>Tags <span class="count">1</span>
508</h2>
509<ul>
510<li>
511<a href="/diffs/tree/v1.0.0">
512<span class="mark" aria-hidden="true"> </span>v1.0.0</a>
513</li>
514</ul>
515</section>
516</div>
517</dialog>
518<dialog id="panel-cmd" class="panel modal" aria-label="Go to" hx-on:close="ermiteFinder.paletteClose()" hx-on:keydown="event.key === 'Escape' && (event.preventDefault(), this.close())" hx-on:click="event.target === this && this.close()">
519<div class="panel-head">
520<label for="cmd-q" class="sr">go to</label>
521<input id="cmd-q" type="search" placeholder="Go to a section, branch, tag, file or repository…" autocomplete="off" spellcheck="false" role="combobox" aria-autocomplete="list" aria-expanded="true" aria-controls="cmd-list" aria-activedescendant="cmd-o0" hx-on:input="ermite.cmdFilter(this); ermiteFinder.palette(this)" hx-on:keydown="ermite.cmdKey(event)">
522<button type="button" class="panel-x" aria-label="Close" hx-on:click="closest('dialog').close()">
523<kbd>esc</kbd>
524</button>
525</div>
526<ul id="cmd-list" class="cmd-list" role="listbox" aria-label="Targets">
527<li id="cmd-o0" role="option" aria-selected="true" data-k="go home" data-cursor>
528<a href="/" tabindex="-1">
529<span class="lbl">home</span>
530<span class="k">go</span>
531</a>
532</li>
533<li id="cmd-o1" role="option" aria-selected="false" data-k="section summary">
534<a href="/diffs" tabindex="-1">
535<span class="lbl">summary</span>
536<span class="k">section</span>
537</a>
538</li>
539<li id="cmd-o2" role="option" aria-selected="false" data-k="section files">
540<a href="/diffs/tree/main" tabindex="-1">
541<span class="lbl">files</span>
542<span class="k">section</span>
543</a>
544</li>
545<li id="cmd-o3" role="option" aria-selected="false" data-k="section commits">
546<a href="/diffs/commits/main" tabindex="-1">
547<span class="lbl">commits</span>
548<span class="k">section</span>
549</a>
550</li>
551<li id="cmd-o4" role="option" aria-selected="false" data-k="section branches & tags">
552<a href="/diffs/refs" tabindex="-1">
553<span class="lbl">branches & tags</span>
554<span class="k">section</span>
555</a>
556</li>
557<li id="cmd-o5" role="option" aria-selected="false" data-k="section merge requests">
558<a href="/diffs/merge-requests" tabindex="-1">
559<span class="lbl">merge requests</span>
560<span class="k">section</span>
561</a>
562</li>
563<li id="cmd-o6" role="option" aria-selected="false" data-k="section actions">
564<a href="/diffs/actions" tabindex="-1">
565<span class="lbl">actions</span>
566<span class="k">section</span>
567</a>
568</li>
569<li id="cmd-o7" role="option" aria-selected="false" data-k="branch main">
570<a href="/diffs/tree/main" tabindex="-1">
571<span class="lbl">main</span>
572<span class="k">branch</span>
573</a>
574</li>
575<li id="cmd-o8" role="option" aria-selected="false" data-k="branch side">
576<a href="/diffs/tree/side" tabindex="-1">
577<span class="lbl">side</span>
578<span class="k">branch</span>
579</a>
580</li>
581<li id="cmd-o9" role="option" aria-selected="false" data-k="tag v1.0.0">
582<a href="/diffs/tree/v1.0.0" tabindex="-1">
583<span class="lbl">v1.0.0</span>
584<span class="k">tag</span>
585</a>
586</li>
587<li id="cmd-o10" role="option" aria-selected="false" data-k="action turn single-key shortcuts on off keyboard">
588<a href="#" data-fire="keys" tabindex="-1">
589<span class="lbl">turn single-key shortcuts off</span>
590<span class="k">action</span>
591</a>
592</li>
593</ul>
594<p class="panel-foot">
595<span>
596<kbd>↑</kbd>
597<kbd>↓</kbd> move</span>
598<span>
599<kbd>enter</kbd> open</span>
600<span>
601<kbd>esc</kbd> close</span>
602</p>
603</dialog>
604<div id="keys" hidden hx-on="k-j from:body -> ermite.move(1);
605 k-k from:body -> ermite.move(-1);
606 k-top from:body -> ermite.edge(false);
607 k-bottom from:body -> ermite.edge(true);
608 k-open from:body -> ermite.open();
609 k-right from:body -> ermite.rail(true);
610 k-left from:body -> ermite.rail(false);
611 k-esc from:body -> ermite.closeDialogs();
612 k-help from:body -> ermite.dialog('panel-help');
613 k-refs from:body -> ermite.dialog('panel-refs', 'refs-filter');
614 k-cmd from:body -> ermite.dialog('panel-cmd', 'cmd-q'); ermiteFinder.load();
615 k-filter from:body -> ermite.focusFilter();
616 k-gh from:body -> ermite.go('.brand');
617 k-s from:body -> ermite.tab('s');
618 k-t from:body -> ermite.tab('t');
619 k-c from:body -> ermite.tab('c');
620 k-r from:body -> ermite.tab('r');
621 k-m from:body -> ermite.tab('m');
622 k-next from:body -> ermite.nextNote();
623 k-split from:body -> ermite.layout('split');
624 k-unified from:body -> ermite.layout('unified');
625 k-collapse from:body -> ermite.collapse();
626 k-expand from:body -> ermite.expandFile();
627 k-expandAll from:body -> ermite.expandAll();
628 k-permalink from:body -> ermite.permalink();
629 k-merge from:body -> window.ermiteMR?.openMerge();
630 k-read from:body -> window.ermiteMR?.markRead();
631 k-gf from:body -> window.ermiteMR?.focusFiles();
632 k-keys from:body -> ermite.toggleKeys()">
633</div>
634</body>
635</html>