git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Jinwook Jeong <vustthat@gmail.com>, git@vger.kernel.org
Subject: Re: bugreport: "git config --global" fails if an invalid .git file present
Date: Thu, 18 Aug 2022 09:28:14 -0700	[thread overview]
Message-ID: <xmqq35dtseht.fsf@gitster.g> (raw)
In-Reply-To: <Yv3ZKcD0L0dSIavr@coredump.intra.peff.net> (Jeff King's message of "Thu, 18 Aug 2022 02:16:09 -0400")

Jeff King <peff@peff.net> writes:

> And that would make your case Just Work. But it's also more dangerous;
> if a misconfiguration or transient error caused us to set up an
> unexpected environment, then the results could be quite wrong and
> confusing. Maybe less so for "git config", but for destructive
> operations it's a scarier concept.

That is a good point, especially if destructive command is run in a
repository the user didn't mean to run it in, it would not be
pretty.

> In your case, the right resolution is probably to delete the bogus .git
> file.

Yup, that was what I said in a draft I wrote a few days ago and
still in my outbox ;-)

  reply	other threads:[~2022-08-18 16:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-16 16:16 bugreport: "git config --global" fails if an invalid .git file present Jinwook Jeong
2022-08-18  6:16 ` Jeff King
2022-08-18 16:28   ` Junio C Hamano [this message]
2022-08-24 11:34     ` Jinwook Jeong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq35dtseht.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=vustthat@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).