On Mon, Mar 25, 2013 at 3:13 PM, Jonathan Nieder <jrnie...@gmail.com> wrote:
> Junio C Hamano wrote:
>
>>                                                            I do not
>> know how things will break when the end user sets and exports it to
>> the environment, and I do not think we would want to make any
>> promise on how it works.
>
> That's a reasonable desire, and it means it's a good thing we noticed
> this before the envvar escaped to "master".  People *will* use such
> exposed interfaces unless they are clearly marked as internal.  That's
> just a fact of life.
>
> Here's a rough patch to hopefully improve matters.
>
> Longer term, it would be nice to have something like
> GIT_IMPLICIT_WORK_TREE exposed to let scripts cache the result of the
> search for .git.  Maybe something like "GIT_BARE=(arbitrary value)"
> would be a good interface.
>
> Signed-off-by: Jonathan Nieder <jrnie...@gmail.com>
> ---
>
> diff --git a/cache.h b/cache.h
> index 59e5b53..8f92b6d 100644
> --- a/cache.h
> +++ b/cache.h
> @@ -377,7 +377,7 @@ static inline enum object_type object_type(unsigned int 
> mode)
>   * of this, but we use it internally to communicate to sub-processes that we
>   * are in a bare repo. If not set, defaults to true.
>   */
> -#define GIT_IMPLICIT_WORK_TREE_ENVIRONMENT "GIT_IMPLICIT_WORK_TREE"
> +#define GIT_IMPLICIT_WORK_TREE_ENVIRONMENT "GIT_INTERNAL_IMPLICIT_WORK_TREE"

Maybe the environment variable for internal-use-only should be
prefixed with an underscore?

-Brandon
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to