[chef] Re: Re: Re: Re: Re: Re: Re: Issue deploying with application cookbook - STDERR: fatal: reference is not a tree: af5c7ff84dd852cf1c0b5ca60ea92546a20dda01


Chronological Thread 
  • From: Daniel DeLeo < >
  • To:
  • Subject: [chef] Re: Re: Re: Re: Re: Re: Re: Issue deploying with application cookbook - STDERR: fatal: reference is not a tree: af5c7ff84dd852cf1c0b5ca60ea92546a20dda01
  • Date: Wed, 24 Jul 2013 08:24:08 -0700


On Wednesday, July 24, 2013 at 6:54 AM, Cassiano Leal wrote:

It works:


:/tmp$ COMMIT_ID=`git ls-remote "> :zynkmobile/resourcemanager.git develop`

:/tmp$ git clone "> :zynkmobile/resourcemanager.git

Cloning into 'resourcemanager'...

remote: Counting objects: 1703, done.

remote: Compressing objects: 100% (729/729), done.

remote: Total 1703 (delta 1193), reused 1349 (delta 948)

Receiving objects: 100% (1703/1703), 20.07 MiB | 183 KiB/s, done.

Resolving deltas: 100% (1193/1193), done.

:/tmp$ cd resourcemanager/

:/tmp/resourcemanager$ git checkout -b deploy $COMMIT_ID

fatal: Cannot update paths and switch to branch 'deploy' at the same time.

Did you intend to checkout 'refs/heads/develop' which can not be resolved as commit?

:/tmp/resourcemanager$ echo $COMMIT_ID

af5c7ff84dd852cf1c0b5ca60ea92546a20dda01 refs/heads/develop

:/tmp/resourcemanager$ git checkout -b deploy `echo $COMMIT_ID | cut -d' ' -f1`

Switched to a new branch 'deploy'

:/tmp/resourcemanager$


Another interesting thing is that if I list branched on this manually cloned repo, here’s what I get:


:/tmp/resourcemanager$ git branch -a

* deploy

  master

  remotes/origin/HEAD -> origin/master

  remotes/origin/develop

  remotes/origin/master



On the one that was cloned by Chef, on the other hand:


:/opt/apps/resourcemanager/shared/cached-copy$ git branch -a

* master

  remotes/origin/HEAD -> origin/master

  remotes/origin/master


The develop branch is not present. My only guess is that Chef’s way of cloning does not clone the whole thing, and for some reason leaves the branch I need out.

The only options chef passes to git clone are `-o REMOTE` if remote is not set to "origin" (default) and `--depth DEPTH` if you specified a clone depth. Are you setting `shallow_clone true`? Does it work if you explicitly pass `shallow_clone false` ?


-- 
Daniel DeLeo




Archive powered by MHonArc 2.6.16.

§