Skip to content

Instantly share code, notes, and snippets.

@simonw
Last active August 29, 2015 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simonw/417f81279654e8e2f116 to your computer and use it in GitHub Desktop.
Save simonw/417f81279654e8e2f116 to your computer and use it in GitHub Desktop.
How to order the lines in a file by their age according to git blame (useful for checking things like which are the oldest lines in a Python requirements.txt file)
2014-10-22: https://pypi.python.org/packages/source/l/librabbitmq/librabbitmq-1.5.2.tar.gz#md5=842aea204fcfb5d7a541ae72d5ad38bc
2014-10-28: https://pypi.python.org/packages/source/r/raven/raven-3.5.2.tar.gz#md5=a3fe6c823d01cca0802b78d43cc4953a
2014-10-31: https://pypi.python.org/packages/source/e/exam/exam-0.10.5.tar.gz#md5=cb5a5848f3779283054d5556a6c16f55
git blame -l -e -- requirements.txt | awk '{print $4 ": " $8}' | sort
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment