mirror of
https://github.com/osmarks/mycorrhiza.git
synced 2025-12-08 17:38:08 +00:00
Rename WikiDir to WikiGitDir
Rhymes well with the forecoming Structure.
This commit is contained in:
@@ -162,7 +162,7 @@ func (rev *Revision) bestLink() string {
|
||||
func gitsh(args ...string) (out bytes.Buffer, err error) {
|
||||
fmt.Printf("$ %v\n", args)
|
||||
cmd := exec.Command(gitpath, args...)
|
||||
cmd.Dir = cfg.WikiDir
|
||||
cmd.Dir = cfg.WikiGitDir
|
||||
cmd.Env = gitEnv
|
||||
|
||||
b, err := cmd.CombinedOutput()
|
||||
@@ -175,7 +175,7 @@ func gitsh(args ...string) (out bytes.Buffer, err error) {
|
||||
// silentGitsh is like gitsh, except it writes less to the stdout.
|
||||
func silentGitsh(args ...string) (out bytes.Buffer, err error) {
|
||||
cmd := exec.Command(gitpath, args...)
|
||||
cmd.Dir = cfg.WikiDir
|
||||
cmd.Dir = cfg.WikiGitDir
|
||||
cmd.Env = gitEnv
|
||||
|
||||
b, err := cmd.CombinedOutput()
|
||||
|
||||
@@ -176,7 +176,7 @@ func parseRevisionLine(line string) Revision {
|
||||
|
||||
// FileAtRevision shows how the file with the given file path looked at the commit with the hash. It may return an error if git fails.
|
||||
func FileAtRevision(filepath, hash string) (string, error) {
|
||||
out, err := gitsh("show", hash+":"+strings.TrimPrefix(filepath, cfg.WikiDir+"/"))
|
||||
out, err := gitsh("show", hash+":"+strings.TrimPrefix(filepath, cfg.WikiGitDir+"/"))
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user