git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Apr 30, 2009, 09:21 UTC
Message-ID
<alpine.DEB.1.00.0904301117040.6621@intel-tinevez-2-302>
In-Reply-To
<94a0d4530904300211j57903a3ei782b4e3e2f967c8a@mail.gmail.com>
Hi,
On Thu, 30 Apr 2009, Felipe Contreras wrote:
Show 18 quoted lines
> On Thu, Apr 30, 2009 at 11:37 AM, Johannes Schindelin
> <Johannes.Schindelin@gmx.de> 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@gmail.com>
> >
> > 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

Previous: Felipe ContrerasNext: Junio C Hamano
Message 6 of 8 in “git config: error when editing a repo config and not being in one”
  1. git config: error when editing a repo config and not being in oneFelipe Contreras, Apr 29, 2009
  2. Johannes SchindelinApr 29, 2009
  3. git config: error when editing a repo config and not being in oneFelipe Contreras, Apr 29, 2009
  4. Johannes SchindelinApr 30, 2009
  5. Felipe ContrerasApr 30, 2009
  6. Johannes SchindelinApr 30, 2009
  7. Junio C HamanoApr 29, 2009
  8. Junio C HamanoApr 29, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.