Correctly print stats summary

This commit is contained in:
Miguel de la Cruz 2024-06-30 12:20:18 +02:00
parent 2282cdecfd
commit 6a1b122d2d

View file

@ -40,17 +40,42 @@
{{.commit.Msg}} {{.commit.Msg}}
<b>Diffstat:</b> <b>Diffstat:</b>
<table><tr><td class="M">M</td><td><a href="#h0">LICENSE</a></td><td> | </td><td class="num">2</td><td><span class="i">+</span><span class="d">-</span></td></tr></table></pre> <table>
<pre>1 file changed, 1 insertion(+), 1 deletion(-) <tr>
<hr/><b>diff --git a/<a id="h0" href="../file/LICENSE.html">LICENSE</a> b/<a href="../file/LICENSE.html">LICENSE</a></b> <td class="M">M</td>
<a href="#h0-0" id="h0-0" class="h">@@ -1,6 +1,6 @@ <td><a href="#h0">stagit-index.c</a></td>
</a> MIT/X Consortium License <td> | </td>
<td class="num">2</td>
<td><span class="i">+</span><span class="d">-</span></td>
</tr>
<tr>
<td class="M">M</td>
<td><a href="#h1">stagit.c</a></td>
<td> | </td>
<td class="num">2</td>
<td><span class="i">+</span><span class="d">-</span></td>
</tr>
</table></pre><pre>{{.commit.Files}} file{{if ne .commit.Files 1}}s{{end}} changed, {{.commit.Adds}} insertion{{if ne .commit.Adds 1}}s{{end}}(+), {{.commit.Dels}} deletion{{if ne .commit.Dels 1}}s{{end}}(-)
<hr/><b>diff --git a/<a id="h0" href="../file/stagit-index.c.html">stagit-index.c</a> b/<a href="../file/stagit-index.c.html">stagit-index.c</a></b>
<a href="#h0-0" id="h0-0" class="h">@@ -179,7 +179,7 @@ main(int argc, char *argv[])
</a> int i, ret = 0;
<a href="#h0-0-2" id="h0-0-2" class="d">-(c) 2015-2022 Hiltjo Posthuma &lt;hiltjo@codemadness.org&gt; if (argc &lt; 2) {
</a><a href="#h0-0-3" id="h0-0-3" class="i">+(c) 2015-2024 Hiltjo Posthuma &lt;hiltjo@codemadness.org&gt; <a href="#h0-0-3" id="h0-0-3" class="d">- fprintf(stderr, &quot;%s [repodir...]\n&quot;, argv[0]);
</a> </a><a href="#h0-0-4" id="h0-0-4" class="i">+ fprintf(stderr, &quot;usage: %s [repodir...]\n&quot;, argv[0]);
Permission is hereby granted, free of charge, to any person obtaining a </a> return 1;
copy of this software and associated documentation files (the &quot;Software&quot;), }
<b>diff --git a/<a id="h1" href="../file/stagit.c.html">stagit.c</a> b/<a href="../file/stagit.c.html">stagit.c</a></b>
<a href="#h1-0" id="h1-0" class="h">@@ -1184,7 +1184,7 @@ writerefs(FILE *fp)
</a> void
usage(char *argv0)
{
<a href="#h1-0-3" id="h1-0-3" class="d">- fprintf(stderr, &quot;%s [-c cachefile | -l commits] &quot;
</a><a href="#h1-0-4" id="h1-0-4" class="i">+ fprintf(stderr, &quot;usage: %s [-c cachefile | -l commits] &quot;
</a> &quot;[-u baseurl] repodir\n&quot;, argv0);
exit(1);
}
</pre> </pre>
</div> </div>
</body> </body>