Created
February 1, 2016 08:59
-
-
Save vierbergenlars/5459016b021ee604bd72 to your computer and use it in GitHub Desktop.
This file contains 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
bad_trees=$(git fsck 2>&1 | awk '{print $4}' | sed s/://) | |
commits_with_bad_root_tree=$(git log --pretty=format:%H:%T | grep -E '('$(echo "$bad_trees" | tr "\n" '|' | sed s/.$//)')$' | cut -d: -f1) | |
echo "$bad_trees" | wc -l | |
echo "$commits_with_bad_root_tree" | wc -l | |
echo "$commits_with_bad_root_tree" | git log --stdin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment