List for cgit developers and users
 help / color / mirror / Atom feed
* why no process info when cloning
@ 2016-02-23  7:28 zhang.lei.fly
  2016-02-23  9:45 ` john
  0 siblings, 1 reply; 5+ messages in thread
From: zhang.lei.fly @ 2016-02-23  7:28 UTC (permalink / raw)


I set up a cgit server and used for mirror openstack repo[0]. I just use
the cgit for http clone.

But when cloning using the http url, there is no process bar.

any reason/solution for this?

$ git cl http://git.trystack.cn/openstack-dev/pbr.git
Cloning into 'pbr'...
Checking connectivity... done.

$ git cl https://github.com/openstack-dev/pbr.git
Cloning into 'pbr'...
remote: Counting objects: 3442, done.
remote: Total 3442 (delta 0), reused 0 (delta 0), pack-reused 3442
Receiving objects: 100% (3442/3442), 1.02 MiB | 212.00 KiB/s, done.
Resolving deltas: 100% (1886/1886), done.
Checking connectivity... done.


[0] http://git.trystack.cn/

Regards,
----
Jeffrey Zhang
Blog: http://xcodest.me
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20160223/6c464228/attachment.html>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* why no process info when cloning
  2016-02-23  7:28 why no process info when cloning zhang.lei.fly
@ 2016-02-23  9:45 ` john
  2016-02-23 14:38   ` Jason
  0 siblings, 1 reply; 5+ messages in thread
From: john @ 2016-02-23  9:45 UTC (permalink / raw)


On Tue, Feb 23, 2016 at 03:28:39PM +0800, Jeffrey Zhang wrote:
> I set up a cgit server and used for mirror openstack repo[0]. I just use
> the cgit for http clone.
> 
> But when cloning using the http url, there is no process bar.
> 
> any reason/solution for this?

It's because CGit only supports the dumb HTTP protocol whereas GitHub
supports the smart protocol.  git-http-backend(1) describes how to set
up a webserver for to support the smart protocol.

[aside: given the inefficiency of the dumb HTTP protocol I wonder if we
should mark this features as deprecated in the CGit documentation, or at
least add a WARNING to it.]


^ permalink raw reply	[flat|nested] 5+ messages in thread

* why no process info when cloning
  2016-02-23  9:45 ` john
@ 2016-02-23 14:38   ` Jason
  2016-02-23 14:42     ` john
  0 siblings, 1 reply; 5+ messages in thread
From: Jason @ 2016-02-23 14:38 UTC (permalink / raw)


On Tue, Feb 23, 2016 at 10:45 AM, John Keeping <john at keeping.me.uk> wrote:
> It's because CGit only supports the dumb HTTP protocol whereas GitHub
> supports the smart protocol.  git-http-backend(1) describes how to set
> up a webserver for to support the smart protocol.
>
> [aside: given the inefficiency of the dumb HTTP protocol I wonder if we
> should mark this features as deprecated in the CGit documentation, or at
> least add a WARNING to it.]

Rather than marking this as depreciated - this very useful feature of
cgit - since we share source with git, wouldn't it be possible to
integrate the smart protocol?


^ permalink raw reply	[flat|nested] 5+ messages in thread

* why no process info when cloning
  2016-02-23 14:38   ` Jason
@ 2016-02-23 14:42     ` john
  2016-02-23 15:00       ` Jason
  0 siblings, 1 reply; 5+ messages in thread
From: john @ 2016-02-23 14:42 UTC (permalink / raw)


On Tue, Feb 23, 2016 at 03:38:26PM +0100, Jason A. Donenfeld wrote:
> On Tue, Feb 23, 2016 at 10:45 AM, John Keeping <john at keeping.me.uk> wrote:
> > It's because CGit only supports the dumb HTTP protocol whereas GitHub
> > supports the smart protocol.  git-http-backend(1) describes how to set
> > up a webserver for to support the smart protocol.
> >
> > [aside: given the inefficiency of the dumb HTTP protocol I wonder if we
> > should mark this features as deprecated in the CGit documentation, or at
> > least add a WARNING to it.]
> 
> Rather than marking this as depreciated - this very useful feature of
> cgit - since we share source with git, wouldn't it be possible to
> integrate the smart protocol?

Most of the code is in http-backend.c which isn't included in libgit.a,
it's just used to build the standalone git-http-backend binary.

We could quite easily exec git-http-backend when required but that would
rely on a properly configured git installation and I know in the past
you have wanted to avoid that dependency.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* why no process info when cloning
  2016-02-23 14:42     ` john
@ 2016-02-23 15:00       ` Jason
  0 siblings, 0 replies; 5+ messages in thread
From: Jason @ 2016-02-23 15:00 UTC (permalink / raw)


I would, instead, suggest this elegant hack:

zx2c4 at thinkpad ~ $ cat a.c
int main(int argc, char *argv[])
{
        printf("git's main\n");
}
zx2c4 at thinkpad ~ $ cat b.c
#define main git_http_backend_main
#include "a.c"
#undef main

int main(int argc, char *argv[])
{
        printf("cgit's main\n");
        git_http_backend_main(argc, argv);
}
zx2c4 at thinkpad ~ $ ./a.out
cgit's main
git's main


This way, in fact, we don't even need to use the main function, if it
turns out we could benefit from accessing various static functions.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-02-23 15:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-23  7:28 why no process info when cloning zhang.lei.fly
2016-02-23  9:45 ` john
2016-02-23 14:38   ` Jason
2016-02-23 14:42     ` john
2016-02-23 15:00       ` Jason

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).