Created
March 23, 2015 22:39
-
-
Save invisiblek/f1f5ae60b88e5bf6c07d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Extract your stock source and cd to it | |
# git init | |
# git add . | |
# git commit -m "initial import from <vendor> - <version>" | |
# git remote add caf git://codeaurora.org/quic/la/kernel/msm | |
# git fetch caf | |
# tagfinder | |
best=9999999999 | |
tag="" | |
for commit in $(git tag -l "*LNX*") | |
do | |
match=$(git diff $commit --shortstat --diff-filter M | awk -F' ' '{print $4 + $6}') | |
echo $commit has $match lines changed | |
if [ $match -lt $best ]; then | |
best=$match | |
tag=$commit | |
echo $tag is the new best match with $best lines changed | |
fi | |
done | |
echo "Best match" | |
echo TAG : $tag | |
echo Lines Changed : $best |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment