mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-05 18:05:19 +02:00
Git installation check, show image in single file view, show short SHA1 instead of 40-length string, complete log module
This commit is contained in:
parent
02a81ddb62
commit
5e81383413
16 changed files with 359 additions and 38 deletions
|
@ -11,6 +11,7 @@ import (
|
|||
"html/template"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
|
@ -84,6 +85,11 @@ func LoadRepoConfig() {
|
|||
func NewRepoContext() {
|
||||
zip.Verbose = false
|
||||
|
||||
// Check Git installation.
|
||||
if _, err := exec.LookPath("git"); err != nil {
|
||||
log.Fatal(4, "Fail to test 'git' command: %v (forgotten install?)", err)
|
||||
}
|
||||
|
||||
// Check Git version.
|
||||
ver, err := git.GetVersion()
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue