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

Re: What's cooking in git.git (Jan 2009, #07; Wed, 28)

From
Jeff King <peff@peff.net>
Date
Jan 29, 2009, 03:51 UTC
Message-ID
<20090129035138.GC11836@coredump.intra.peff.net>
In-Reply-To
<7vwscej26i.fsf@gitster.siamese.dyndns.org>
On Wed, Jan 28, 2009 at 06:06:45PM -0800, Junio C Hamano wrote:
Show 5 quoted lines
> * sr/clone-empty (Fri Jan 23 01:07:32 2009 +0100) 1 commit
>  + Allow cloning an empty repository
> 
> Has anybody actually tried this and made sure the resulting empty clone
> works fine after the clone source gets updated with some contents?
Hmm. It sort of works:
  $ mkdir parent && (cd parent && git init)
  Initialized empty Git repository in /home/peff/parent/.git/
  $ git clone parent child
  Initialized empty Git repository in /home/peff/child/.git/
  warning: You appear to have cloned an empty repository.
So far so good...
  $ (cd parent && echo content >file && git add file && git commit -m one)
  [normal commit output]
  $ (cd child && git fetch)
  [normal fetch output]
But:
  $ (cd child && git pull)
  You asked me to pull without telling me which branch you
  want to merge with, and 'branch.master.merge' in
  ...

So it's not quite seamless. The problem is that we're not setting up the branch.master.* config on the empty clone. Nor do we set up refs/remotes/origin/HEAD.

On top of that, I get funniness between versions:
  $ ssh peff.net 'git version && mkdir foo && cd foo && git init'
  git version 1.5.6.5
  Initialized empty Git repository in /mnt/data/home/peff/foo/.git/
  $ git clone peff.net:foo
  Initialized empty Git repository in /home/peff/foo/.git/
  warning: You appear to have cloned an empty repository.
  $ fatal: The remote end hung up unexpectedly
-Peff
Previous: Jeff KingNext: Jeff King
Message 3 of 30 in “What's cooking in git.git (Jan 2009, #07; Wed, 28)”
  1. Junio C HamanoJan 29, 2009
  2. Jeff KingJan 29, 2009
  3. Jeff KingJan 29, 2009
  4. Jeff KingJan 29, 2009
  5. Junio C HamanoJan 29, 2009
  6. Sverre RabbelierJan 29, 2009
  7. Jeff KingJan 29, 2009
  8. Pieter de BieJan 29, 2009
  9. Sverre RabbelierJan 29, 2009
  10. Jeff KingJan 29, 2009
  11. Sverre RabbelierJan 29, 2009
  12. Jeff KingJan 30, 2009
  13. Johannes SchindelinJan 30, 2009
  14. Jeff KingJan 30, 2009
  15. Junio C HamanoFeb 1, 2009
  16. Junio C HamanoFeb 12, 2009
  17. Sverre RabbelierFeb 12, 2009
  18. Johannes SchindelinFeb 12, 2009
  19. Junio C HamanoFeb 12, 2009
  20. Johannes SchindelinFeb 12, 2009
  21. Jeff KingFeb 12, 2009
  22. Jeff KingJan 29, 2009
  23. Nico -telmich- SchotteliusJan 29, 2009
  24. Jeff KingJan 30, 2009
  25. Charles BaileyJan 29, 2009
  26. Junio C HamanoJan 29, 2009
  27. Charles BaileyJan 29, 2009
  28. Charles BaileyJan 30, 2009
  29. Kirill SmelkovFeb 1, 2009
  30. Junio C HamanoFeb 1, 2009

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.