Skip to content

Instantly share code, notes, and snippets.

@peterjaap
Last active August 29, 2015 14:19
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peterjaap/508dd310f7a3f615c875 to your computer and use it in GitHub Desktop.
Save peterjaap/508dd310f7a3f615c875 to your computer and use it in GitHub Desktop.
Find Magento core hacks in Git
#/bin/bash
# This one liner starts looking in the current Git repo from the second commit
# and ends at HEAD, while looking for files changed in Git that are in the app/code/core dir
# Assumes that the first commit was the initial commit of the Magento core
# And assumes that there is no further Magento upgrade committed between the second commit and HEAD
# (otherwise all updated core files will still end up in the output)
git diff --name-only $(git log --pretty=format:%H:%B | cut -d: -f1 | grep -v '^$' | tail -2 | head -1) HEAD | grep "app/code/core"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment