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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 28, 2009 at 06:06:45PM -0800, Junio C Hamano wrote:

> * 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux