Thread (103 messages) flat view 103 messages, 6 authors, 2018-02-28

Re: [PATCH 2/2] Revert "repository: pre-initialize hash algo pointer"

From: Duy Nguyen <hidden>
Date: 2018-02-24 03:45:09

On Sat, Feb 24, 2018 at 5:29 AM, brian m. carlson
[off-list ref] wrote:
quoted
@@ -40,5 +41,8 @@ int main(int argc, const char **argv)

      restore_sigpipe_to_default();

+     if (getenv("GIT_HASH_FIXUP"))
+             repo_set_hash_algo(the_repository, GIT_HASH_SHA1);
I'm lukewarm on adding this environment variable, but considering our
history here, we had probably better.  We can always remove it after a
few releases.
Yes that's the intention. But after writing cover letter for v2 and
sending it out, it looks to me that this thing must stay until all our
code is converted to using the_hash_algo (I don't know if there are
more to convert or it's finished already). So an alternative is we do
the opposite: default to GIT_HASH_SHA1, but when an env variable is
set, reset it back to NULL. This env variable will _always_ be set by
the test suite to help us catch problems.
-- 
Duy
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help