aboutsummaryrefslogtreecommitdiffstats
path: root/t/lib-verify-submodule-gitdir-path.sh
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2025-10-27 00:44:04 +0000
committerJunio C Hamano <gitster@pobox.com>2025-10-29 07:35:01 -0700
commit826f08c8d9b9c7a78f627bd9012dc68885c71109 (patch)
treef6263a93d782533ace60ddd7d3c98d15da6c3e88 /t/lib-verify-submodule-gitdir-path.sh
parentrust: add a small wrapper around the hashfile code (diff)
downloadgit-826f08c8d9b9c7a78f627bd9012dc68885c71109.tar.gz
git-826f08c8d9b9c7a78f627bd9012dc68885c71109.zip
object-file-convert: always make sure object ID algo is valid
In some cases, we zero-initialize our object IDs, which sets the algo member to zero as well, which is not a valid algorithm number. This is a bad practice, but we typically paper over it in many cases by simply substituting the repository's hash algorithm. However, our new Rust loose object map code doesn't handle this gracefully and can't find object IDs when the algorithm is zero because they don't compare equal to those with the correct algo field. In addition, the comparison code doesn't have any knowledge of what the main algorithm is because that's global state, so we can't adjust the comparison. To make our code function properly and to avoid propagating these bad entries, if we get a source object ID with a zero algo, just make a copy of it with the fixed algorithm. This has the benefit of also fixing the object IDs if we're in a single algorithm mode as well. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/lib-verify-submodule-gitdir-path.sh')
0 files changed, 0 insertions, 0 deletions