Thread (11 messages) 11 messages, 3 authors, 2022-09-22

Re: fatal: options '--bare' and '--origin foo' cannot be used together

From: Jeff King <hidden>
Date: 2022-09-22 05:31:18

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help