Re: [DONOTAPPLY PATCH 2/3] setup: warn about implicit worktree with $GIT_DIR
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Mar 26, 2013, 20:21 UTC
- Message-ID
- <20130326202142.GL1414@google.com>
- In-Reply-To
- <20130326201208.GB22522@sigill.intra.peff.net>
Jeff King wrote:
Show 9 quoted lines
> --- a/setup.c
> +++ b/setup.c
> @@ -437,6 +437,23 @@ const char *read_gitfile(const char *path)
> return path;
> }
>
> +static const char warn_implicit_work_tree_msg[] =
> +N_("You have set GIT_DIR (or used --git-dir) without specifying\n"
> + "a working tree. In Git 2.0, the behavior will changePlease no. I don't want git 2.0 to be delayed forever.
If we want this warning, would something like the following do?
warning: You have set GIT_DIR without setting GIT_WORK_TREE hint: In this case, GIT_WORK_TREE defaults to '.' hint: To suppress this message, set GIT_WORK_TREE='.'
Thanks, Jonathan