git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Petr Baudis <pasky@suse.cz>
Cc: git@vger.kernel.org
Subject: Re: Cogito: cg-clone doesn't like packed tag objects
Date: Sat, 24 Sep 2005 11:10:40 -0700	[thread overview]
Message-ID: <7virwqwd3z.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: 20050924125001.GB25069@pasky.or.cz

Petr Baudis <pasky@suse.cz> writes:

>> I think you could run git-peek-remote to find all the refs and
>> then run git-fetch-pack to slurp all the tags (and heads for
>> that matter) at once.  Is there a particular reason you would
>> prefer the commit walker?
>
> Actually, probably not, except consistency with rsync and http handling
> - but that's obviously not too good reason.

We would end up doing things internally differently between
git-native (fetch/clone-pack) and other protocols (commit walker
which is git-aware, and rsync which is not) anyway.

I misspoke for 'git-fetch-pack' in the above -- git-fetch-pack
without any refspec fetches all the refs, so you do not need a
separate peek-remote.  Right now 'git fetch' wrapper does not
let you take advantage of this, but if we wanted to add '--all'
flag to 'git fetch' wrapper, it can be implemented very easily
and efficiently for the git-native protocol.  An implementation
of such a flag for other protocols would use git-ls-remote to
find out the refs upfront.

> I will probably rewrite the tags fetching to use git-peek-remote
> (info/refs for http) the next weekend.

If you are targetting multiple protocols, git-ls-remote is the
one to use, not peek-remote.  It internally uses peek-remote for
git-native protocol, and emulates it using info/refs for http
and recursive get for rsync, so no new coding on Cogito part
should be necessary.

> default post-update hook could change to
>
> 	[ -e "$_git/git-dummy-support" ] && exec git-update-server-info
>
> and be enabled by default?

That is a thought.  While I think doing update-server-info
everywhere whenever you update ref is going a bit overboard, I
agree there should be an easy way for the end user to keep
repositories that are public accessible all times.  But running
server-info upon every commit does not make much sense to me --
something is seriously broken if we need to do that.

Cases when you would want to make your repository accessible
from outside itself varies and preferred transport obviously
depends on it.

 - Your private working area.  Typically does not allow
   anonymous downloads.  You are the only one to use git tools
   and compilation there (that's what 'private' means).

 - A CVS style shared repository.  May allow anonymous
   downloads, and allow uploads to people with 'commit
   privilege' in CVS lingo.

 - A public distribution point, like kernel.org repository.
   This is just a special case of the 'shared repository' above,
   with yourself as the only uploader.

I thought there would be more classes, but it really boils down
to whether you would allow anonymous downloads or not -- so
let's call them private and public.

Fetching over non git-native protocol is the only case where
server-info matters; so obviously it is nicer if public
repository is arranged so that update-server-info is run
everytime refs and set of packs change.

I do not think of a good reason not to use git-aware protocol
when one is fetching from a private repo -- so if we just say
people should not use non git-aware protocol when doing so, we
do not have to do server-info in the private repositories at
all.

So the question is, how often do we need to run update to keep
the refs and set of packs in public repository in sync with the
server-info.  What do people do in public repository to affect
set of packs and the refs?

 - Initiate a push into it from somewhere else; this case is
   covered by enabling post-update hook.

 - You log on to the machine of public repository and run 'git
   repack'; this runs update-server-info, so it is OK.

 - You log on to the machine of public repository and run fetch
   of another repository -- you may even end up hand merging and
   creating new commits.

 - You log on to the machine of public repository and do your
   development, making your own commits.

It is the latter two cases where your 'update-server-info
everywhere in Cogito' would be needed -- but is it realistic?

  parent reply	other threads:[~2005-09-24 18:10 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-23 22:24 Cogito: cg-clone doesn't like packed tag objects H. Peter Anvin
2005-09-24  1:18 ` Petr Baudis
2005-09-24  1:52   ` H. Peter Anvin
2005-09-24  2:00   ` Junio C Hamano
2005-09-24 12:50     ` Petr Baudis
2005-09-24 17:13       ` Daniel Barkalow
2005-09-24 18:10       ` Junio C Hamano [this message]
2005-11-09 22:33         ` Petr Baudis
2005-11-09 23:14           ` Junio C Hamano
2005-11-09 23:36             ` Nick Hengeveld
2005-11-09 23:44               ` Petr Baudis
2005-11-10  1:01                 ` Nick Hengeveld
2005-11-09 23:47               ` Junio C Hamano
2005-09-26 21:25   ` Petr Baudis
2005-09-26 21:55     ` Brian Gerst
2005-09-26 21:56       ` Petr Baudis
2005-09-26 22:23     ` Junio C Hamano
2005-09-26 22:29       ` Petr Baudis
2005-09-27  4:46         ` Junio C Hamano
2005-09-27  5:02           ` Tom Prince
2005-09-27  5:28             ` Junio C Hamano
2005-09-27  9:40               ` Petr Baudis
2005-09-27 10:14                 ` Josef Weidendorfer
2005-09-27 12:34                   ` Petr Baudis
2005-09-27 13:27                     ` Josef Weidendorfer
2005-09-27 17:07                 ` Junio C Hamano
2005-09-27 17:56                   ` Linus Torvalds
2005-09-27 18:36                     ` Junio C Hamano
2005-09-27 21:16                       ` Linus Torvalds
2005-09-27 21:44                         ` Linus Torvalds
2005-09-27 22:11                         ` Junio C Hamano
2005-09-28 17:22                         ` Junio C Hamano
2005-10-14  6:03                           ` Peeling the onion Junio C Hamano
     [not found]                             ` <46a038f90510140048r30c7ec36n35f77a1ac52c4691@mail.gmail.com>
2005-10-14  8:40                               ` Junio C Hamano
2005-09-26 22:37       ` Cogito: cg-clone doesn't like packed tag objects Junio C Hamano
2005-09-27  6:54     ` Sven Verdoolaege
2005-09-27  7:25     ` Ryan Anderson
2005-09-27 15:34       ` Linus Torvalds
2005-09-27 17:34         ` Ryan Anderson
2005-09-27 18:04           ` Linus Torvalds
2005-09-27  7:46     ` Junio C Hamano

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=7virwqwd3z.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=git@vger.kernel.org \
    --cc=pasky@suse.cz \
    /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).