Re: [PATCH 2/2] builtin/hash-object: fix uninitialized hash function
Patrick Steinhardt <ps@pks.im> writes:
Show 14 quoted lines
> diff --git a/builtin/hash-object.c b/builtin/hash-object.c
> index 82ca6d2bfd..0855f4f8aa 100644
> --- a/builtin/hash-object.c
> +++ b/builtin/hash-object.c
> @@ -123,6 +123,13 @@ int cmd_hash_object(int argc, const char **argv, const char *prefix)
> else
> prefix = setup_git_directory_gently(&nongit);
>
> + /*
> + * TODO: Allow the hash algorithm to be configured by the user via a
> + * command line option when not using `-w`.
> + */
> + if (nongit)
> + repo_set_hash_algo(the_repository, GIT_HASH_SHA1);
This breaks t1007 when
linux-sha256)
export GIT_TEST_DEFAULT_HASH=sha256is in effect.