Finding exact specific (date-based) Moodle version in git

Re: Finding exact specific (date-based) Moodle version in git

by Tim Hunt -
Number of replies: 1
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
git log -S '2018051700.00' upstream/master # OR upstream/MOODLE_35_STABLE

Will find any commit that adds or removes the given string. That gets you to a relatively narrow range of commits.

I think the $release  = '3.6dev (Build: 20180524)'; line in config.php might give you even more information.

Another thing you can then use is something like

git log --pretty=%h 46574904afd39578fa..6b2e04676a6ccfe | xargs -i git diff --shortstat {}

That will show how many lines differ between each of those commits and your current code. Looking for a minimum of that might be the commit you want.



Average of ratings: Useful (3)
In reply to Tim Hunt

Re: Finding exact specific (date-based) Moodle version in git

by Olli Savolainen -

Thanks Tim!

git log -S '2018051700.00' upstream/MOODLE_35_STABLE
is what I needed. Adding the correct stable branch makes the search much quicker.

Not sure I understand what you meant by the latter part and what that actually does, but no matter.