gitinfo.txt not updated in incremental build
Describe the bug
I recently built ROOT from source. Then I grabbed 10 more commits git pull that were pushed during the last hours, and rebuilt in a couple of minutes as only a few things were changed.
When I call root -b, the SHA version it points at is still the one before git pull.
Expected behavior
etc/gitinfo.txt should contain the latest git pull, not the one before, even if nothing in the 'core' was changed inbetween.
To Reproduce
- Build
- Pull a couple of new commits
- Rebuild
- Open etc/gitinfo.txt to check
Setup
------------------------------------------------------------------
| Welcome to ROOT 6.27/01 https://root.cern |
| (c) 1995-2022, The ROOT Team; conception: R. Brun, F. Rademakers |
| Built for linuxx8664gcc on Aug 30 2022, 13:52:01 |
| From heads/master@v6-25-01-4921-gdfd0f52391 |
| With c++ (Ubuntu 8.4.0-1ubuntu1~18.04) 8.4.0 |
| Try '.help'/'.?', '.demo', '.license', '.credits', '.quit'/'.q' |
------------------------------------------------------------------
That's intentional: we don't want to rebuild libCore because the git hash changes.
The only way out would be to have TROOT::GetGitCommit() read a text file rather than rebuilding anything. I'll leave this open; this sounds like a useful improvement!
My reasoning is bogus :-) Updating a text file obviously doesn't trigger a rebuild. We should just update gitinfo.txt any time we build.
Should be fixed in master and 6.30. Can you confirm?
Confirmed, thanks a lot !!