shithub: riscv

Download patch

ref: c6ae349e9d67ef24ce429f699c5232a9acdcb1ea
parent: ee46f70288c4a41ce2884a9ae676c61e131bdd35
author: Michael Forney <mforney@mforney.org>
date: Sat Oct 8 02:06:17 EDT 2022

git/hist: fix with repository other than /

$gitroot has a trailing slash only when the repository is at /.  When
it is not, this path construction doesn't work. Use $gitfs/... like
the other git scripts.

--- a/sys/src/cmd/git/hist
+++ b/sys/src/cmd/git/hist
@@ -7,8 +7,8 @@
 fn dodiff {
 	while(t=`{read}){
 		h=$t(1)
-		o=$gitroot^.git/fs/object/`{git/query $h~}
-		c=$gitroot^.git/fs/object/$h
+		o=$gitfs/object/`{git/query $h~}
+		c=$gitfs/object/$h
 		echo 'Hash:' $h
 		echo -n 'Date: '; date `{walk -em $c/msg}
 		echo -n 'Author: '; cat $c/author