Checkout & Sync 55.0.2883.105 - "fatal: reference is not a tree"

898 views
Skip to first unread message

Joel Winarske

unread,
Jan 12, 2017, 8:44:12 PM1/12/17
to Chromium-dev
Hi folks,

I'm trying to enlist 55.0.2883.105, and I'm seeing missing commit hash in submodule:

$ git fetch --tags
$ git checkout 55.0.2883.105
$ gclient sync --with_branch_heads
Syncing projects:  21% (16/76) src/third_party/catapult

src/buildtools (ERROR)
----------------------------------------
[0:00:00] Started.
----------------------------------------
Error: Command 'git checkout --quiet 39b1db2ab4aa4b2ccaa263c29bdf63e7c1ee28aa' returned non-zero exit status 128 in /media/joel/ssd2/chrome/src/buildtools
fatal: reference is not a tree: 39b1db2ab4aa4b2ccaa263c29bdf63e7c1ee28aa

I seem to hit this on all the attempts enlisting a tag.  In multiple cases I "rm -rf *" the directory and try with a new enlistment, ending in the same pattern.

What am I missing?

Thanks,
Joel

Joel Winarske

unread,
Jan 13, 2017, 2:15:22 PM1/13/17
to Chromium-dev
I originally pulled the tree with:
  fetch --nohooks --no-history chromium

So there was no local history of the commit I was trying to go to.  I resolved it by navigating to the submodule, and issued:
  git fetch origin 39b1db2ab4aa4b2ccaa263c29bdf63e7c1ee28aa

It seems this should be part of the error handling in "gclient sync" - if git not tree error, run "git fetch origin <commit>.


Cheers,
Joel

Joel Winarske

unread,
Jan 13, 2017, 2:24:45 PM1/13/17
to Chromium-dev
Running "git fetch origin 39b1db2ab4aa4b2ccaa263c29bdf63e7c1ee28aa", isn't the complete solution.

Prior to the "git fetch origin ..." I had run:
  git fetch --depth=6

Which gave me a false positive.

6 is how far I was off based on looking at the commit list.


I'm sure there is a better way, other than getting complete history on first fetch?

Primiano Tucci

unread,
Jan 16, 2017, 12:44:07 PM1/16/17
to joel.w...@gmail.com, Chromium-dev
If you fetch with no history than you can't easily checkout older releases that require the history.
There is a workaround I posted a number of times in this ML and it involves un-shallowing the affected repos.
Unfortunately git doesn't easily allow to fetch a ref which is behind the shallowing point.


--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
Reply all
Reply to author
Forward
0 new messages