summaryrefslogtreecommitdiff
path: root/t/t4109/expect-3
diff options
context:
space:
mode:
authorLibravatar Taylor Blau <me@ttaylorr.com>2021-08-31 16:51:55 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-09-01 10:58:43 -0700
commit426c00e4541367bcd96e542f971d8995e3bb1d54 (patch)
tree8f8ea263e626de90aec04c51e5201ef62f969f9f /t/t4109/expect-3
parentmidx: disallow running outside of a repository (diff)
downloadtgif-426c00e4541367bcd96e542f971d8995e3bb1d54.tar.xz
midx: fix `*.rev` cleanups with `--object-dir`
If using --object-dir to point into an object directory which belongs to a different repository than the one in the current working directory, such as: git init repo git -C repo ... # add some objects cd alternate git multi-pack-index --object-dir ../repo/.git/objects write the binary will segfault trying to access the object-dir via the repo it found, but that's not fully initialized. Worse, if we later call clear_midx_files_ext(), we will use `the_repository` and remove files out of the wrong object directory. Fix this by using the given object_dir (or the object directory of `the_repository` if `--object-dir` wasn't given) to properly to clean up the *.rev files, avoiding the crash. Original-patch-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4109/expect-3')
0 files changed, 0 insertions, 0 deletions