git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: "John A. Leuenhagen" <john@zlima12.com>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: fatal: options '--bare' and '--origin foo' cannot be used together
Date: Thu, 22 Sep 2022 01:31:13 -0400	[thread overview]
Message-ID: <YyvzIQL9H9aTYNch@coredump.intra.peff.net> (raw)
In-Reply-To: <Yyvq01W/r73xfgqf@coredump.intra.peff.net>

On Thu, Sep 22, 2022 at 12:55:47AM -0400, Jeff King wrote:

> This second case is IMHO a minor bug in the git-remote code. As
> documented in git-clone(1):
> [...]
> So probably it needs to use the "gently" version of git_config_set_multivar(),
> which avoids calling die(), and then check for a return code which
> indicates no value was found.

Actually, there is an even simpler fix. So here are two cleaned-up
patches which fix both issues you found.

  [1/2]: clone: allow "--bare" with "-o"
  [2/2]: remote: handle rename of remote without fetch refspec

 builtin/clone.c          |  3 ---
 builtin/remote.c         | 48 +++++++++++++++++++++-------------------
 t/t5505-remote.sh        | 11 +++++++++
 t/t5606-clone-options.sh |  9 ++++----
 4 files changed, 41 insertions(+), 30 deletions(-)

-Peff

  reply	other threads:[~2022-09-22  5:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-21 19:23 fatal: options '--bare' and '--origin foo' cannot be used together John A. Leuenhagen
2022-09-22  4:55 ` Jeff King
2022-09-22  5:31   ` Jeff King [this message]
2022-09-22  5:32     ` [PATCH 1/2] clone: allow "--bare" with "-o" Jeff King
2022-09-22  5:58       ` Eric Sunshine
2022-09-22  6:18         ` Jeff King
2022-09-22  6:26           ` Eric Sunshine
2022-09-22  6:35             ` Jeff King
2022-09-22  6:40               ` Eric Sunshine
2022-09-22  6:26           ` Jeff King
2022-09-22  5:33     ` [PATCH 2/2] remote: handle rename of remote without fetch refspec Jeff King

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=YyvzIQL9H9aTYNch@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=john@zlima12.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).