I want to have a closer look at the darktable source code, so I am playing around with building the software myself. When building the current master branch, the version displayed is 4.7.0+1441~g45d7d3149b, while the version of the build from branch darktable-4.8.x starts with 4.8.0+…
Shouldn’t the version number of the master branch also be based on 4.8.0?
Technically, yes, but we are so close after release it probably hasn’t been done yet.
It has, it should actually be 4.9.0+blah…
You need to pull all the tags.
So I did “git fetch --tags” and compiled again the master branch, but the version number did not change.
And when looking at the Git Graph it seems to me that the master branch is actually behind the 4.8 branch, if I understand git correctly.
If I checkout entire master branch history:
$ git clone --recurse-submodules https://github.com/darktable-org/darktable.git
$ cd darktable
I get:
$ git branch
$ * master
$ git describe
$ release-4.9.0-41-g45d7d3149b
The git fetch command does not update the master branch. You also need to run git reset --hard origin/master to get the branch to the latest version. Alternatively you can replace both commands with git pull which will fetch and update the branch.
Thanks for all your comments! This seems to become rather a git/Github topic for me, then.
What puzzles me is that I cloned the darktable repo exactly as mentioned by KarlMagnusLarsson already several weeks ago. But neither git fetch plus git reset --hard origin/master nor git pull as described by elstoc resulted in the correct version number. Only after cloning the repo again from scratch I get the expected result.
Yes, that is the issue here, I believe. The official readme, get the source states:
git clone --recurse-submodules --depth 1 https://github.com/darktable-org/darktable.git
cd darktable
The --depth 1 parameter is useful to minimize the amount of code you clone, but it makes other operations on local repo harder since the information is not there.
One could RTFM and do git fetch --unshallow.
But yes, maybe --depth 1 is not strictly necessary/desired, so please feel free to contribute a PR for the documentation.
In any case, these git Q&As are more for StackOverflow etc. than pixls.us…
I think --depth 1 in darktable README is fine. It serves a very useful purpose, so I think it should stay there. The needed steps to do further checkout of a release with tag is already there.
Surely, I can and will contribute if I find something where I can do so, mostly issue reports, in my case.