git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 0/2] RFC: Better handling of git init remote-spec

From
Peter Krefting <peter@softwolves.pp.se>
Date
Nov 12, 2010, 11:31 UTC
Message-ID
<cover.1289561504.git.peter@softwolves.pp.se>
>From time to time I forget myself and try to initialize a repository on a remote
machine by writing something like
  git init --bare remote.machine:myrepo.git
just to get a local directory called "remote.machine:myrepo.git" set up.
Or, even worse, a
  git init --bare ssh://remote.machine/myrepo.git

These patches try to fix this. The first patch tries to detect if a remote repository specification was supplied, and just stop with an error message. That one is fairly safe.

The second one I haven't got working yet, but I have the beginnings of a patch that actually tries to run "git-init" on the remote repository. Any ideas on how to get this actually working (it should be possible for the "ssh" transport at least) are welcome.

Peter Krefting (2):
  Detect attempts at calling git init specifying a remote repository.
  WIP: Allow running git init on a remote repository specification.
 builtin/init-db.c |   16 +++++++++++++++-
 remote.c          |   11 +++++++++++
 remote.h          |    1 +
 3 files changed, 27 insertions(+), 1 deletions(-)
-- 
1.7.3
Next: Peter Krefting
Message 1 of 9 in “RFC: Better handling of git init remote-spec”
  1. 0/2 RFC: Better handling of git init remote-specPeter Krefting, Nov 12, 2010
  2. 1/2 [RFC] Detect attempts at calling git init specifying a remote repository.Peter Krefting, Nov 12, 2010
  3. Junio C HamanoNov 16, 2010
  4. Peter KreftingNov 16, 2010
  5. 2/2 [WIP] Allow running git init on a remote repository specification.Peter Krefting, Nov 12, 2010
  6. Sverre RabbelierNov 13, 2010
  7. Peter KreftingNov 16, 2010
  8. Junio C HamanoNov 16, 2010
  9. Peter KreftingNov 16, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.