shithub: riscv

Download patch

ref: acc504c319a4b4188479cfa602e40cb6851c0528
parent: be36c092ac061a04065720e98e5849130487be7f
author: Ori Bernstein <ori@eigenstate.org>
date: Sun Jul 18 10:59:51 EDT 2021

git/fetch: fix overly eager 's/pack/idx/g' in refactor

This would break pulling. We would try to index into
a place that didn't exist.

--- a/sys/src/cmd/git/fetch.c
+++ b/sys/src/cmd/git/fetch.c
@@ -267,7 +267,7 @@
 
 	if((packtmp = smprint(".git/objects/pack/fetch.%d.pack", getpid())) == nil)
 		sysfatal("smprint: %r");
-	if((idxtmp = smprint(".git/objects/idx/fetch.%d.idx", getpid())) == nil)
+	if((idxtmp = smprint(".git/objects/pack/fetch.%d.idx", getpid())) == nil)
 		sysfatal("smprint: %r");
 	if(mkoutpath(packtmp) == -1)
 		sysfatal("could not create %s: %r", packtmp);