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.
This commit is contained in:
Ori Bernstein 2021-07-18 14:59:51 +00:00
parent be36c092ac
commit acc504c319

View file

@ -267,7 +267,7 @@ fetchpack(Conn *c)
if((packtmp = smprint(".git/objects/pack/fetch.%d.pack", getpid())) == nil) if((packtmp = smprint(".git/objects/pack/fetch.%d.pack", getpid())) == nil)
sysfatal("smprint: %r"); 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"); sysfatal("smprint: %r");
if(mkoutpath(packtmp) == -1) if(mkoutpath(packtmp) == -1)
sysfatal("could not create %s: %r", packtmp); sysfatal("could not create %s: %r", packtmp);