git submodule update --init Error while installing dot-emacs files

401 views Asked by At

I try to install a dotfiles config for emacs (https://github.com/dhaley/dot-emacs). I did all like instructed (download and install of the macport of emacs via brew, clone of the repsitory) and now when I use the command git submodules update --init I get the following error:

$git submodule update --init
fatal: reference is not a tree: a2bcba9a92873900055dcaff640e4d31a650947e
fatal: reference is not a tree: 05f9cebc64842efa2968d49adb08330d15c7ffe8
fatal: reference is not a tree: 89611c7a6947787bf2f591e64e22b7444ea5ed41
Unable to checkout 'a2bcba9a92873900055dcaff640e4d31a650947e' in submodule path 'override/bbdb'
Unable to checkout '05f9cebc64842efa2968d49adb08330d15c7ffe8' in submodule path 'site-lisp/auctex'
Unable to checkout '89611c7a6947787bf2f591e64e22b7444ea5ed41' in submodule path 'site-lisp/drupal-mode'

Some of these did not have an entry in the .gitmodules file and I added it manually. But now I have no clue how to fix this error. I new to emacs and the hole dotfile thing so if you can give me a hint it would be great (on stackoverflow I found Git submodule head 'reference is not a tree' error but did not really understand if this is my problem and how to fix it)

PS: I send a mail to Damon Haley the maintainer of the repository with a link to this, as I found no forum to discuss issues on the github repository.

Best Regards and thanks to everybody contribution to this greate community,

Dennis

1

There are 1 answers

2
VonC On BEST ANSWER
fatal: reference is not a tree: 89611c7a6947787bf2f591e64e22b7444ea5ed41  
Unable to checkout 'a2bcba9a92873900055dcaff640e4d31a650947e' in submodule path 'override/bbdb'

That means the repo referenced by the submodule (here git://git.savannah.nongnu.org/bbdb.git) doesn't contains that commit.
One probable cause is when that submodule repo has seen its history changed (through a push --force for instance)

There isn't much to do except than forking https://github.com/dhaley/dot-emacs, and update your fork with a commit that seems to you compatible (after exploring git://git.savannah.nongnu.org/bbdb.git). That way, you could submit a pull request asking for the maintainer of the parent repo dot-emacs to update the reference of that submodule with the SHA1 that you would have found.