[git][align][litre] git submodule update failure.
$ git submodule update libs/align fatal: reference is not a tree: d32353ea7d39c0237202e3e460f3248f226db274 Unable to checkout 'd32353ea7d39c0237202e3e460f3248f226db274' in submodule path 'libs/align' $ git submodule update tools/litre fatal: reference is not a tree: 564d4d8d30b7e03ac5e25d78e14d2c19fa321c83 Unable to checkout '564d4d8d30b7e03ac5e25d78e14d2c19fa321c83' in submodule path 'tools/litre' According to this: http://stackoverflow.com/questions/13425298/git-submodule-update-fatal-error... , this is most likely a maintainer's bug. From the above: "This is the most common problem with submodules. The commit that you are on in the outer repository has a reference to a commit in the submodule that someone did not push up yet. It's a dependency problem. Always push from the inside-out. This is most likely not something you did wrong, but someone else that's working in the repository. They were sloppy and forgot to issue push on the submodule and just pushed the containing repository. Stuff works on their machine because they made the change and those commits exist there." Is this true?
On Fri, Sep 5, 2014 at 7:11 PM, Mostafa
They were sloppy and forgot to issue push on the submodule and just pushed the containing repository.
A push on the containing repository would fail, for lack of access rights. The log shows only the bot changing those links. Looks like the link for align was changed to that hash on May 17th, 2014. Pulling so that all links are updated should have align with hash 31b36c91c586a3b011f9720d57bc8f34ce661499 (which was set on Sept 3rd, 2014), which should succeed. I haven't checked litre, but I never saw an error when attempting to update all submodules or pull everything. Glen
On 6 September 2014 03:11, Mostafa
$ git submodule update libs/align fatal: reference is not a tree: d32353ea7d39c0237202e3e460f3248f226db274 Unable to checkout 'd32353ea7d39c0237202e3e460f3248f226db274' in submodule path 'libs/align'
$ git submodule update tools/litre fatal: reference is not a tree: 564d4d8d30b7e03ac5e25d78e14d2c19fa321c83 Unable to checkout '564d4d8d30b7e03ac5e25d78e14d2c19fa321c83' in submodule path 'tools/litre'
'litre' hasn't changed since the git conversion, so if you had a previously good checkout it should still be there, so there's possibly something wrong with your clone. Try going to the submodule's directory and running 'git fetch'. Also, do you have any remotes pointing at other locations? Git might be fetching from the wrong place. I find it best to keep the 'boostorg' as origin, and any forks as other branches. Also, if the submodule's current branch is tracking another remote, it will fetch from there (which seems wrong to me, it should really fetch from the remote that the super-project refers to).
On Sat, 06 Sep 2014 01:53:20 -0700, Daniel James
On 6 September 2014 03:11, Mostafa
wrote: $ git submodule update libs/align fatal: reference is not a tree: d32353ea7d39c0237202e3e460f3248f226db274 Unable to checkout 'd32353ea7d39c0237202e3e460f3248f226db274' in submodule path 'libs/align'
$ git submodule update tools/litre fatal: reference is not a tree: 564d4d8d30b7e03ac5e25d78e14d2c19fa321c83 Unable to checkout '564d4d8d30b7e03ac5e25d78e14d2c19fa321c83' in submodule path 'tools/litre'
'litre' hasn't changed since the git conversion, so if you had a previously good checkout it should still be there, so there's possibly something wrong with your clone. Try going to the submodule's directory and running 'git fetch'.
Also, do you have any remotes pointing at other locations? Git might be fetching from the wrong place. I find it best to keep the 'boostorg' as origin, and any forks as other branches. Also, if the submodule's current branch is tracking another remote, it will fetch from there (which seems wrong to me, it should really fetch from the remote that the super-project refers to).
Thanks for the info. None of the workarounds suggested in this thread or elsewhere worked. I eventually had to make a new clone, and that worked. (Most google search pinned the blame for this type of error on some upstream mismatch, but obviously that was not it in this case.)
participants (3)
-
Daniel James
-
Glen Fernandes
-
Mostafa