Take the 2-minute tour ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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