{"thread":{"id":"61226","subject":"Git Gui Clone: Error Failed to create repository (with hints)","startedAt":"2024-03-29T21:12:20Z","lastAt":"2024-04-03T01:30:40Z","messageCount":2,"participants":["Tobias Boesch","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"491857","messageId":"6aadf39561e13681c069d4da7b1a4581f143dc92.camel@googlemail.com","threadId":"61226","inReplyTo":null,"subject":"Git Gui Clone: Error Failed to create repository (with hints)","fromName":"Tobias Boesch","fromEmail":"tobias.boesch@googlemail.com","sentAt":"2024-03-29T21:12:17Z","receivedAt":"2024-03-29T21:12:20Z","isPatch":false,"sender":{"key":"tobias.boesch@googlemail.com","avatar":null},"body":"Hello everyone,\n\nwhen I clone a git repo (from github or COdeberg) through Git Gui I get\nthe following GUI error (nothing in the terminal and nothing in\njournalctl):\n\n\"Failed to create repository <repo-path>: Hint Using 'master' as the\nname for the initial branch. This default branch...\" and so on.\n\nScreenshot\nhttps://i.postimg.cc/66df98MZ/Screenshot-from-2024-03-29-22-06-49.png\n\nI have no idea what is going on here. Has someone an idea what the\nreason could be?\n\nCloning the same source into the same path from command line works.\nThe cloned git repo opens fine in git gui.\n\nBest wishes\nTobias\n"},{"id":"492129","messageId":"20240403013039.GD892394@coredump.intra.peff.net","threadId":"61226","inReplyTo":"6aadf39561e13681c069d4da7b1a4581f143dc92.camel@googlemail.com","subject":"Re: Git Gui Clone: Error Failed to create repository (with hints)","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2024-04-03T01:30:39Z","receivedAt":"2024-04-03T01:30:40Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Mar 29, 2024 at 10:12:17PM +0100, Tobias Boesch wrote:\n\n> when I clone a git repo (from github or COdeberg) through Git Gui I get\n> the following GUI error (nothing in the terminal and nothing in\n> journalctl):\n> \n> \"Failed to create repository <repo-path>: Hint Using 'master' as the\n> name for the initial branch. This default branch...\" and so on.\n> \n> Screenshot\n> https://i.postimg.cc/66df98MZ/Screenshot-from-2024-03-29-22-06-49.png\n> \n> I have no idea what is going on here. Has someone an idea what the\n> reason could be?\n\nI don't work on or use git-gui, but it is written in Tcl/Tk. And IIRC\nTcl is very anxious to consider programs that print anything to stderr\nas \"failed\". And in this case we are just printing warning/hint\ndiagnostics to stderr.\n\nI suspect there are solutions within git-gui's code base to check the\nactual exit code, and it's just a bug that we're not using them in this\ninstance. But the obvious workaround in the meantime is to set the\nconfig that the hint mentions, which should silence it.\n\n> Cloning the same source into the same path from command line works.\n> The cloned git repo opens fine in git gui.\n\nRight, the clone is happening fine. It's just that git-gui is\nincorrectly thinking that it failed.\n\n-Peff\n"}]}