Re: [DONOTAPPLY PATCH 2/3] setup: warn about implicit worktree with $GIT_DIR

2013-03-27 Thread Matthieu Moy
Jeff King writes: > I probably shouldn't have included this middle patch at all, because > the interesting thing is what happens when we do turn it off. Actually, I think the warning is the most important part. With the warning enabled, people should notice they are doing something potentially w

Re: [DONOTAPPLY PATCH 2/3] setup: warn about implicit worktree with $GIT_DIR

2013-03-26 Thread Jonathan Nieder
Jeff King wrote: > On Tue, Mar 26, 2013 at 01:21:42PM -0700, Jonathan Nieder wrote: >> 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

Re: [DONOTAPPLY PATCH 2/3] setup: warn about implicit worktree with $GIT_DIR

2013-03-26 Thread Jeff King
On Tue, Mar 26, 2013 at 01:21:42PM -0700, Jonathan Nieder wrote: > Jeff King wrote: > > > --- 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

Re: [DONOTAPPLY PATCH 2/3] setup: warn about implicit worktree with $GIT_DIR

2013-03-26 Thread Jonathan Nieder
Jeff King wrote: > --- 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