[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