Re: [PATCH] git config: error when editing a repo config and not being in one

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Thu, 30 Apr 2009, Felipe Contreras wrote:

> On Thu, Apr 30, 2009 at 11:37 AM, Johannes Schindelin
> <Johannes.Schindelin@xxxxxx> wrote:
>
> > On Thu, 30 Apr 2009, Felipe Contreras wrote:
> >
> >> Let's throw an error on this specific case. If the user specifies the 
> >> config file, he must know what he is doing.
> >>
> >> Teemu Likonen pointed this out.
> >>
> >> Signed-off-by: Felipe Contreras <felipe.contreras@xxxxxxxxx>
> >
> > I would have Acked it, but Junio already applied it ;-)
> 
> :)
> 
> Just for the record, where is people supposed to learn about 'nongit'? 
> Apparently it's not mentioned in the documentation.

It's not about 'nongit'.  It is about setting up the git directory 
"gently", i.e you can ask for a setup _if possible_ using 
setup_git_directory_gently(), which will not fail if we're not in any 
repository.

To require a repository, call setup_git_directory().  This will die() if 
there is no repository.

As we already ask via _gently() in cmd_config(), it appeared natural to me 
to reuse that information rather than redoing the discovery.

Ciao,
Dscho

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

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]