git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Fredrik Gustafsson <iveqy@iveqy.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Fredrik Gustafsson <iveqy@iveqy.com>, git@vger.kernel.org
Subject: Re: Enhancements to git-protocoll
Date: Sun, 29 Jul 2012 16:24:58 +0200	[thread overview]
Message-ID: <20120729142458.GB16223@paksenarrion.iveqy.com> (raw)
In-Reply-To: <7vehnvvyta.fsf@alter.siamese.dyndns.org>

On Sat, Jul 28, 2012 at 11:58:09PM -0700, Junio C Hamano wrote:
> Fredrik Gustafsson <iveqy@iveqy.com> writes:
> 
> > Sometimes the server wants to communicate directly to the git user.
> > ...
> > For example:
> > gitolite has something called wild repos[1]. The management is
> > cumbersome and if you misspell when you clone a repo you might instead
> > create a new repo.
> >
> > This could have been avoided with a simply:
> > "Do you want to create a new repo[Yn]"
> 
> I do not think the automatic repository creation done by gitolite is
> a good use case or example for whatever you seem to be advocating.
> 
> IIUC, the auto-creation in gitolite-shell::main() is done way before
> gitolite-shell (which is used as a login shell for incoming ssh
> sessions) creates a new git repository, goes into it and spawns the
> git-receive-pack command.  It all happens outside Git.
> 
>     # auto-create?
>     if ( repo_missing($repo) and access( $repo, $user, '^C', 'any' ) !~ /DENIED/ ) {
>         require Gitolite::Conf::Store;
>         Gitolite::Conf::Store->import;
>         new_wild_repo( $repo, $user, $aa );
>         gl_log( 'create', $repo, $user, $aa );
>     }
> 
> The "access()" we see here is not the Perl builtin access(), but is
> a function defined in src/lib/Gitolite/Conf/Load.pm; that would be
> the place to allow the incoming ssh session to talk back to the end
> user, but at that point there is no Git processing on the server
> end.

That's a feature. It means that the impact on git would be rather small,
we don't have to involve server-side git at all. The problem so solve is
how to get client-side git to pass through STDIN and STDOUT (just as is
done with STDERR right now). I see this as a gitolite <-> client-git
interaction case. No server-git should be involved.

All the use casese I can imagine will be done before (or after)
serverside git is executed.

> While I am not fundamentally opposed to adding yet another sideband
> channel to the git protocol, I do not think adding user interaction
> at random places in the protocol exchange is a viable or useful
> approach to implement an enhanced server that works with both
> enhanced and vanilla clients (and the same is true for enhanced
> client that works with both enhanced and vanilla server).

Do we mean the same thing with "git protocol"? I specify the protocol as
everything that happens between the server and the client. Are the
connection divided into multiple protocoll after eachother? (would it be
possible to execute git-user-interaction-protocoll first and the
git-protocoll and then git-user-interaction-protocoll again?).

The vanilla case would be easy to solve if the protocol has git version
in its handshake. The STDERR approach is already used and working. A
vanilla client would have the same functionality as today and en
enhanced client will have enhanced functionality.

-- 
Med vänliga hälsningar
Fredrik Gustafsson

tel: 0733-608274
e-post: iveqy@iveqy.com

  reply	other threads:[~2012-07-29 14:24 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-28 21:41 Enhancements to git-protocoll Fredrik Gustafsson
2012-07-29  6:58 ` Junio C Hamano
2012-07-29 14:24   ` Fredrik Gustafsson [this message]
2012-07-29 14:39     ` Sitaram Chamarty
2012-07-29 20:51       ` Junio C Hamano
2012-07-29 21:26         ` Fredrik Gustafsson
2012-07-30  0:37           ` Sitaram Chamarty
2012-07-29 21:38         ` Junio C Hamano
2012-07-30  1:04           ` Sitaram Chamarty
2012-07-30  1:21             ` Shawn Pearce
2012-07-30  1:33               ` Sitaram Chamarty
2012-07-30  2:38               ` Junio C Hamano
2012-07-30  5:20                 ` Shawn Pearce
2012-07-30  6:28                   ` Junio C Hamano
2012-07-30  8:12                     ` Sitaram Chamarty
2012-07-30  8:31                     ` Sitaram Chamarty
2012-07-30  1:28             ` Junio C Hamano
2012-07-30  1:45               ` Sitaram Chamarty
2012-07-29 10:37 ` Sitaram Chamarty
2012-07-29 14:13   ` Fredrik Gustafsson
2012-07-29 14:25     ` Sitaram Chamarty
2012-07-29 15:05       ` Fredrik Gustafsson
2012-07-29 15:15         ` Sitaram Chamarty
2012-07-29 15:41           ` Fredrik Gustafsson
2012-07-29 18:22             ` Sitaram Chamarty

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=20120729142458.GB16223@paksenarrion.iveqy.com \
    --to=iveqy@iveqy.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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;
as well as URLs for NNTP newsgroup(s).