From: Junio C Hamano <gitster@pobox.com>
To: Robin Rosenberg <robin.rosenberg.lists@dewire.com>
Cc: git@vger.kernel.org
Subject: Re: Init on push
Date: Sat, 08 Nov 2008 11:26:27 -0800 [thread overview]
Message-ID: <7viqqyc93w.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <200811081708.45672.robin.rosenberg.lists@dewire.com> (Robin Rosenberg's message of "Sat, 8 Nov 2008 17:08:45 +0100")
Robin Rosenberg <robin.rosenberg.lists@dewire.com> writes:
> git remote add someremote someurl
> git push --init someremote/someurl
>
> The implementation would invoke receive pack on the receiving side with
> an --init option. On the server side the repository would be created and
> initialized just as one had executed and mkdir and git init --bare.
We saw this quite a number of times. I think it's about time we did
something about it.
But I do not think it is a reasonable design to give receive-pack such an
option.
An easy alternative would be to issue the usual "mkdir && git init" shell
script before spawning receive-pack. This will limit the feature to
pushing over the ssh transport, and pushing over the git protocol against
a loose git-daemon will not be able to support it. Also I suspect this
will break sites managed by gitosis, where all repositories are held under
the same UNIX user identity, differenciated only via an environment it
sets based on the ssh key used to make the connection.
I wonder if you can take a middle ground alternative:
- Make "git push --init [--shared] $site:$there" and "git push --init
[--shared] git://$site/$there" run "git init -D [--shared] $there"
followed by "git receive-pack $there";
- Teach "-D $there" option to "git init", which does an "mkdir -p $it &&
chdird $it" before it does its work.
- Teach "git daemon" about the "init" service, which is disabled by
default, and can be enabled just like you can enable receive-pack
there.
If sites like repo.or.cz, github, or managed with gitosis want to use
this, I think you might further need to give "git init -D $there" a hook
to control who can create new repositories at which location (gitosis is
the most interesting case, as described above).
next prev parent reply other threads:[~2008-11-08 19:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-08 16:08 Init on push Robin Rosenberg
2008-11-08 19:26 ` Junio C Hamano [this message]
2008-11-08 20:01 ` Alexander Gavrilov
2008-11-08 20:12 ` Junio C Hamano
2008-11-08 20:06 ` Jakub Narebski
2008-11-08 20:08 ` Francis Galiegue
2008-11-08 20:38 ` Junio C Hamano
2008-11-08 20:44 ` Francis Galiegue
2008-11-08 20:50 ` Francis Galiegue
2008-11-09 0:13 ` Junio C Hamano
2008-11-09 1:41 ` Francis Galiegue
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7viqqyc93w.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=robin.rosenberg.lists@dewire.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox