Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Clone

Read only, no credentials:

https://rodent.software/git/vole.git

Write over SSH with a registered key:

git clone ssh://git@0.0.0.0:2222/vole.git

A free and open-source forge that lives in your Git repo.

Add repository code search

aef992843b95fd107327b103c12d135cd708c11e · Keenan Nemetz · 15d ago · parent 5cab7b18

Add repository code search

The Code tab now searches file names and plain-text contents at the selected branch. Contents go through git grep with fixed strings, case-insensitive matching, binary skipping, and a capped result set; there is no second index to drift. Results group by file and link to line anchors in the blob view. Also highlights a targeted line and adds the remaining polish notes to the UI plan.

server/web/templates/code.html +6−1

@@ -8,6 +8,11 @@
8 8 <p class="page-sub">{{.Count}} commit(s) on <code>{{.Ref}}</code></p>
9 9 </div>
10 10 <div class="page-head-actions">
11 <form method="get" action="/r/{{.Name}}/search" class="inline search-code" role="search">
12 <input type="hidden" name="ref" value="{{.Ref}}">
13 <input type="search" name="q" placeholder="Search code" aria-label="Search code">
14 <button class="secondary" type="submit">{{icon "search"}}</button>
15 </form>
11 16 <form method="get" action="/r/{{.Name}}/code" class="inline">
12 17 <select name="ref" data-autosubmit aria-label="Branch">
13 18 {{range .Branches}}<option value="{{.}}"{{if eq . $.Ref}} selected{{end}}>{{.}}</option>{{end}}
@@ -181,7 +186,7 @@ git push -u origin {{.Ref}}</pre>
181 186 <table class="code">
182 187 <tbody>
183 188 {{range $i, $line := .Lines}}
184 <tr><td class="ln">{{inc $i}}</td><td class="code">{{$line}}</td></tr>
189 <tr id="L{{inc $i}}"><td class="ln">{{inc $i}}</td><td class="code">{{$line}}</td></tr>
185 190 {{end}}
186 191 </tbody>
187 192 </table>