From: Shreyansh Paliwal Date: Tue, 20 Jan 2026 14:05:38 GMT Subject: [RFC][PATCH 0/3] show-index: modernize and implement auto-detection of hash algorithm Message-ID: <20260120140901.517928-1-shreyanshpaliwalcmsmn@gmail.com> This patch series improves the current git show-index implementation, by adding automatic hash detection, removing global state variables, and wrapping error messages for better clarity. Currently, when git show-index is run outside of a repository, it falls back to SHA-1 unless --object-format is explicitly provided, the first patch implements automatic hash detection, but it only works when there are no 64-bit offsets present in the index file. I am unsure if there is an appropriate way to detect such cases. Additionally, please let me know if there are any tests that should be made or modified for these changes, or if any documentation updates are expected as well. Do let me know your thoughts on this. Shreyansh Paliwal (3): show-index: implement automatic hash detection show-index: use gettext wrapping in error messages show-index: remove global state variables builtin/show-index.c | 74 ++++++++++++++++++++++++++++---------------- 1 file changed, 48 insertions(+), 26 deletions(-) -- 2.52.0