go to a specific commit number not id on github
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
go to a specific commit number not id on github
how is it possible to jump to commit number 10000 or 99 or 1111 or even 1 on github?
bernd
bernd
Re: go to a specific commit number not id on github
In contrast to subversion which uses a consecutive number for its revisions git uses hash values. Since a hash value is not very useful for a user to decide if a certain version is older than another we apply a trick to achieve a consecutive number like in subversion by counting the number of commits:
git rev-list HEAD --count
Now to get the hash value of e.g. the 1111th commit you first must apply the above command to get the number of commits (e.g. 14795) and subtract 1111 from it (13684). With git log --skip=13684 you get the corresponding hash value git commit 73ee872301b1a51c
git rev-list HEAD --count
Now to get the hash value of e.g. the 1111th commit you first must apply the above command to get the number of commits (e.g. 14795) and subtract 1111 from it (13684). With git log --skip=13684 you get the corresponding hash value git commit 73ee872301b1a51c
Re: go to a specific commit number not id on github
Thats cool werner
BTW: FYI because I don't mind ... github says it is commit 1088 https://github.com/FreeCAD/FreeCAD/tree/73ee872
BTW: FYI because I don't mind ... github says it is commit 1088 https://github.com/FreeCAD/FreeCAD/tree/73ee872
Re: go to a specific commit number not id on github
But 14795-14793 = 2 not 1 github needs some coaching in simple math
Re: go to a specific commit number not id on github
This is because at some point something got messed up in the history or so and thus we start from a certain reference commit:bernd wrote: ↑Mon Sep 24, 2018 10:46 am Thats cool werner
BTW: FYI because I don't mind ... github says it is commit 1088 https://github.com/FreeCAD/FreeCAD/tree/73ee872
see https://github.com/FreeCAD/FreeCAD/blob ... ev.py#L175
But nevertheless this is already a good start point for further investigations.
Re: go to a specific commit number not id on github
Ahh yes github says commit 14555 too https://github.com/FreeCAD/FreeCAD/tree/7d8e53a same as https://github.com/FreeCAD/FreeCAD/blob ... #L183-L184
Re: go to a specific commit number not id on github
or https://github.com/FreeCAD/FreeCAD/comm ... 396761+239 click on the commit and click on brows files. Github will show 14555
239 = 14795 - 14555 - 1
Code: Select all
https://github.com/FreeCAD/FreeCAD/commits/master?after=8668296f9c7287827888d5f16acbfcaf1b396761+239
Re: go to a specific commit number not id on github
or
240 = 14795 - 14555
240 = 14795 - 14555
Code: Select all
git log --skip=240 --oneline -1
Code: Select all
$ git log --skip=240 --oneline -1
7d8e53aaa add Const to ancestorsOfType
$