+1
-1
knotserver/git/git.go
+1
-1
knotserver/git/git.go
···
308
308
}
309
309
cacheMu.RUnlock()
310
310
311
-
cmd := exec.Command("git", "-C", g.path, "log", "-1", "--format=%H %ct", "--", path)
311
+
cmd := exec.Command("git", "-C", g.path, "log", g.h.String(), "-1", "--format=%H %ct", "--", path)
312
312
313
313
var out bytes.Buffer
314
314
cmd.Stdout = &out
+8
-1
knotserver/git/tree.go
+8
-1
knotserver/git/tree.go
···
2
2
3
3
import (
4
4
"fmt"
5
+
"time"
5
6
6
7
"github.com/go-git/go-git/v5/plumbing/object"
7
8
"tangled.sh/tangled.sh/core/types"
···
56
57
lastCommit, err := g.LastCommitForPath(fpath)
57
58
if err != nil {
58
59
fmt.Println("error getting last commit time:", err)
59
-
continue
60
+
// We don't want to skip the file, so worst case lets just
61
+
// populate it with "defaults".
62
+
lastCommit = &types.LastCommitInfo{
63
+
Hash: g.h,
64
+
Message: "",
65
+
When: time.Now(),
66
+
}
60
67
}
61
68
62
69
nts = append(nts, types.NiceTree{