...because gitdb returns a Repo instance corresponding to the _main_ repository instead of the submodule if you give it a submodule path. Assuming buildhistory/ is a Git submodule, a simple way to verify this is running $ poky/scripts/buildhistory-diff <a revision from the submodule> , which gives a 'Specified git revision <rev> is not valid' error. On the other hand, $ poky/scripts/buildhistory-diff <a revision from the main repository> works, but doesn't print any useful info as the main repository is not a buildhistory repo.
I can't reproduce this. Here is what I tried: 1. add buildhistory as a submodule: git submodule add file:///home/ed/git/yocto/poky/build/buildhistory bh 2. run buildhistory-diff for it: $ buildhistory-diff -p bh -a HEAD~6 images/qemux86_64/glibc/core-image-minimal: DISTRO_VERSION changed from "2.0+snapshot-20160330" to "2.0+snapshot-20160331" 3. run buildhistory-diff for build/buildhistory to compare the output: $ buildhistory-diff -a HEAD~6 images/qemux86_64/glibc/core-image-minimal: DISTRO_VERSION changed from "2.0+snapshot-20160330" to "2.0+snapshot-20160331" As you can see the output is the same in both cases. Please, provide details of your setup and instructions how to reproduce the issue. Thanks.
Closing as worksforme. Feel free to re-open and provide more details.