git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Git Gui Clone: Error Failed to create repository (with hints)
@ 2024-03-29 21:12 Tobias Boesch
  2024-04-03  1:30 ` Jeff King
  0 siblings, 1 reply; 2+ messages in thread
From: Tobias Boesch @ 2024-03-29 21:12 UTC (permalink / raw
  To: git

Hello everyone,

when I clone a git repo (from github or COdeberg) through Git Gui I get
the following GUI error (nothing in the terminal and nothing in
journalctl):

"Failed to create repository <repo-path>: Hint Using 'master' as the
name for the initial branch. This default branch..." and so on.

Screenshot
https://i.postimg.cc/66df98MZ/Screenshot-from-2024-03-29-22-06-49.png

I have no idea what is going on here. Has someone an idea what the
reason could be?

Cloning the same source into the same path from command line works.
The cloned git repo opens fine in git gui.

Best wishes
Tobias


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Git Gui Clone: Error Failed to create repository (with hints)
  2024-03-29 21:12 Git Gui Clone: Error Failed to create repository (with hints) Tobias Boesch
@ 2024-04-03  1:30 ` Jeff King
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff King @ 2024-04-03  1:30 UTC (permalink / raw
  To: Tobias Boesch; +Cc: git

On Fri, Mar 29, 2024 at 10:12:17PM +0100, Tobias Boesch wrote:

> when I clone a git repo (from github or COdeberg) through Git Gui I get
> the following GUI error (nothing in the terminal and nothing in
> journalctl):
> 
> "Failed to create repository <repo-path>: Hint Using 'master' as the
> name for the initial branch. This default branch..." and so on.
> 
> Screenshot
> https://i.postimg.cc/66df98MZ/Screenshot-from-2024-03-29-22-06-49.png
> 
> I have no idea what is going on here. Has someone an idea what the
> reason could be?

I don't work on or use git-gui, but it is written in Tcl/Tk. And IIRC
Tcl is very anxious to consider programs that print anything to stderr
as "failed". And in this case we are just printing warning/hint
diagnostics to stderr.

I suspect there are solutions within git-gui's code base to check the
actual exit code, and it's just a bug that we're not using them in this
instance. But the obvious workaround in the meantime is to set the
config that the hint mentions, which should silence it.

> Cloning the same source into the same path from command line works.
> The cloned git repo opens fine in git gui.

Right, the clone is happening fine. It's just that git-gui is
incorrectly thinking that it failed.

-Peff


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-04-03  1:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-29 21:12 Git Gui Clone: Error Failed to create repository (with hints) Tobias Boesch
2024-04-03  1:30 ` Jeff King

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).