1

I want to checkout a specific dev version of the feeds module using git. I have a site which is using feeds 7.x-2.x-dev. On the modules admin page the module version number is reported as 7.x-2.0-alpha8+99-dev.

I have cloned the feeds module repo but can't work out how to checkout that specific version. I tried using git checkout 7.x-2.0-alpha8+99-dev, but it didn't work. I guess if I knew the commit number I could check it out, but not sure how to easily work this out other than manually reviewing the commit log and working out what was the 99th commit after alpha8. I am hoping there might be an easier way.

Would appreciate any suggestions.

2

This is more a git question than Drupal, but you can use rev-list command to retrieve a list of commit hashes since the 7.x-2.0-alpha8 tag. Using the tail command you can reverse the list to show the first 100 commits (I think the +XX- scheme is an offset from the first commit) then filter that down to the last result (which should be +99-dev commit).

git rev-list 7.x-2.0-alpha8^..HEAD  | tail -r -n 100 | tail -n -1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.