git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Allow git remote add but not git clone ( was Re: [PATCH/RFC] Documentation/git-gc.txt: add reference to githooks)

From
Chris Packham <judge.packham@gmail.com>
Date
Sep 21, 2010, 20:52 UTC
Message-ID
<4C991B29.4030208@gmail.com>
In-Reply-To
<20100921181406.GA7389@huya.qualcomm.com>
On 21/09/10 11:14, David Brown wrote:
> Subject: Re: [PATCH/RFC] Documentation/git-gc.txt: add reference to githooks

Wow odd thread to pickup. Hopefully someone that knows more than me will notice the change of subject an provide a better answer.

Show 7 quoted lines
> Suppose I want to publish some changes to a tree.  I have a server
> available where I can run a git daemon, but for one reason or another
> I want to force people to use the another git repo as a reference.
> The reason could be one of bandwidth, or someone who isn't comfortable
> making all of the other source available.  Ideally, someone who
> already has the other git repo cloned, and just adds mine as a remote
> wouldn't notice the difference.
Sounds like a reasonable motivation.
> Is there a way to do this?

As far as I know no. The mechanisms that git clone and git remote add/git fetch are fairly generic so I doubt there is a way for the git daemon to know which was run by the user at the other end. Maybe there are other possible solutions outside of git to but a cap the amount of data sent. Doesn't look like there are any hooks on the upload-pack side of git daemon.

> If there isn't a way of doing this currently, is this something that
> others would find useful?
I personally wouldn't but I can see why some people might want this.
Previous: David BrownNext: David Brown
Message 17 of 21 in “notify alternative to auto gc?”
  1. Karl StenerudJun 28, 2010
  2. Ævar Arnfjörð BjarmasonJun 28, 2010
  3. Karl StenerudJun 28, 2010
  4. Matthieu MoyJun 29, 2010
  5. Sam VilainJun 30, 2010
  6. Matthieu MoyJun 28, 2010
  7. Chris PackhamJun 28, 2010
  8. Karl StenerudJun 28, 2010
  9. Documentation/git-gc.txt: add reference to githooksChris Packham, Jun 28, 2010
  10. Marc BranchaudJun 28, 2010
  11. Junio C HamanoJun 29, 2010
  12. Chris PackhamJun 29, 2010
  13. Junio C HamanoJun 29, 2010
  14. Chris PackhamJun 29, 2010
  15. [PATCHv2] Documentation/git-gc.txt: add reference to githooksChris Packham, Jun 30, 2010
  16. David BrownSep 21, 2010
  17. Chris PackhamSep 21, 2010
  18. David BrownSep 21, 2010
  19. Re* [PATCH/RFC] Documentation/git-gc.txt: add reference to githooksJunio C Hamano, Sep 21, 2010
  20. Eric RaibleJun 28, 2010
  21. Jacob HelwigJun 28, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.