Skip to content

Instantly share code, notes, and snippets.

@lolgear
Created November 23, 2016 15:44
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 lolgear/e14590f44e1a8c551639a1ce3248f646 to your computer and use it in GitHub Desktop.
Save lolgear/e14590f44e1a8c551639a1ce3248f646 to your computer and use it in GitHub Desktop.
Search Podfile.lock for specific pod commit updates.
# $file = path to file;
# $name = ( name to search (actually, it is a regex) )
# EncryptedCoreData:
# - :commit: 5044489e622143d6efdb69fbbc383748618b5fe4
# + :commit: 4ca0977e9e0b610e6813886276bb7bbd9406335f
#
#
# Pod revision.
git log -p -- FILE | perl -lne '$name = 'PODNAM'; (/^\s+$name[\w-]*:\s*$/ .. /^\+\s+:commit:/) and print'
# more general example.
git log -p -- FILE | perl -lne '(/start_line/ .. /end_line/) and print'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment