Duy Nguyen <pclo...@gmail.com> writes:

> diff --git a/common-main.c b/common-main.c
> index 6a689007e7..a13ab981aa 100644
> --- a/common-main.c
> +++ b/common-main.c
> @@ -1,6 +1,7 @@
>  #include "cache.h"
>  #include "exec_cmd.h"
>  #include "attr.h"
> +#include "repository.h"
>  
>  /*
>   * Many parts of Git have subprograms communicate via pipe, expect the
> @@ -32,6 +33,8 @@ int main(int argc, const char **argv)
>        */
>       sanitize_stdfds();
>  
> +     init_the_repository();
> +
>       git_setup_gettext();
> ...
> +void init_the_repository(void)
> +{
> +     the_repository = &the_repo;
> +     repo_pre_init(the_repository);
> +     the_repository->index = &the_index;
> +     repo_set_hash_algo(the_repository, GIT_HASH_SHA1);
> +}

I see what you did here, and I like it.

Reply via email to