All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Duy Nguyen <pclouds@gmail.com>
Cc: git@vger.kernel.org, spearce@spearce.org, mfick@codeaurora.org
Subject: Re: [PATCH 0/2] Hiding some refs in ls-remote
Date: Sun, 20 Jan 2013 10:19:09 -0800	[thread overview]
Message-ID: <7vip6rn2ea.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <7v38xxnfv3.fsf@alter.siamese.dyndns.org> (Junio C. Hamano's message of "Sat, 19 Jan 2013 11:16:00 -0800")

Junio C Hamano <gitster@pobox.com> writes:

> Duy Nguyen <pclouds@gmail.com> writes:
>
>> Should the client side learn how to list hidden refs too? I'm thinking
>> of an extreme case where upload-pack advertises nothing (or maybe just
>> refs/heads/master) and it's up to the client to ask for the ref
>> selection it's interested in. upload-pack may need more updates to do
>> that, I think.
>
> What you are talking about is a different goal.
>
> Look at this as a mechanism for the repository owner to control the
> clutter in what is shown to the intended audience of what s/he
> publishes in the repository.  Network bandwidth reduction of
> advertisement is a side effect of clutter reduction, and not
> necessarily the primary goal.

As a separate and follow-up topic, I can see a future where we also
have .delayref (in addition to .hideref) configuration, that causes
the upload-pack to:

 * omit refs that are marked as "delayed";

 * advertise "allow-expand-ref=<value>" where the value is the
   pattern used to specify which refs are omitted via this mechanism
   (e.g. "refs/*" in your extreme example, or perhaps "refs/tags/"
   if you only advertise branches in order to limit the bandwidth);

and then a fetch-pack that is interested in fetching "refs/foo/bar",
after seeing that it matches one of the "allow-expand-ref" patterns,
to ask "expand-ref refs/foo/bar", expect the upload-pack to respond
with "refs/foo/bar <value of that ref>" (or "refs/foo/bar does not
exist"), before going into the usual "want" exchange ("ls-remote"
would of course do the same, and pattern-less "ls-remote" may even
ask to expand everything by saying "expand-ref refs/*" (where the
capability said "allow-expand-ref=refs/*" in your extreme example)
to grab everything discoverable).

That is _primarily_ for trading network bandwidth with initial
latency; as far as the end-result is concerned, delayed ones to be
expanded on demand are just as discoverable as the ones advertised
initially.

I think we'd want to have both in the end.  It just happens I just
posted the beginning of clutter-reduction one, as I think developing
both in parallel would be messy and hideref is probably less
involved than the delayref.

  reply	other threads:[~2013-01-20 18:20 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-19  0:37 [PATCH 0/2] Hiding some refs in ls-remote Junio C Hamano
2013-01-19  0:37 ` [PATCH 1/2] upload-pack: share more code Junio C Hamano
2013-01-19  0:37 ` [PATCH 2/2] upload-pack: allow hiding ref hiearchies Junio C Hamano
2013-01-19  5:50 ` [PATCH 0/2] Hiding some refs in ls-remote Duy Nguyen
2013-01-19 19:16   ` Junio C Hamano
2013-01-20 18:19     ` Junio C Hamano [this message]
2013-01-21  1:46     ` Duy Nguyen
2013-01-21 22:56     ` Jeff King
2013-01-19  6:18 ` Michael Haggerty
2013-01-19 16:50 ` Jeff King
2013-01-20 18:06   ` Junio C Hamano
2013-01-20 22:08     ` Junio C Hamano
2013-01-21 23:01       ` Jeff King
2013-01-21 23:33         ` Junio C Hamano
2013-01-21 23:45           ` Jeff King
2013-01-21 23:03     ` Jeff King

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=7vip6rn2ea.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=mfick@codeaurora.org \
    --cc=pclouds@gmail.com \
    --cc=spearce@spearce.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.