Skip to content

RFC: Better handling of git init remote-spec

Peter Krefting git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2Detect attempts at calling git init specifying a remote repository.builtin/init-db.c+6 -12 replies
2/2Allow running git init on a remote repository specification.builtin/init-db.c remote.c remote.h+21 -04 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] RFC: Better handling of git init remote-spec
Quoted 1 line

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(-)
Signature · 1 line
1.7.3