git: check for binary files
1 file changed, 4 insertions(+), 1 deletion(-)
changed files
M templates/commit.html → templates/commit.html
@@ -55,7 +55,9 @@ {{ else }} <a href="/{{ $repo }}/blob/{{ $this }}/{{ .Name.New }}">{{ .Name.New }}</a> {{- end -}} </div> - + {{ if .IsBinary }} + <p>Not showing binary file.</p> + {{ else }} <pre> {{- range .TextFragments -}} <p>{{- .Header -}}</p>@@ -71,6 +73,7 @@ <span class="diff-noop">{{ .String }}</span> {{- end -}} {{- end -}} {{- end -}} + {{- end -}} </pre> </div> {{ end }}