-
-
Save mikeNG/e55ef8e7a1e5cd596a950386503054fd 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
#!/bin/sh | |
case "$2,$3" in | |
merge,) | |
if grep -q "# It looks like you may be committing a merge." "$1"; then | |
sed -i -e '/# ------------------------ >8 ------------------------/,+3d' "$1" | |
/usr/bin/perl -i.bak -ne 's/^#// if /^# Conflicts/ .. /^#\R/; print' "$1" | |
sed -i '/ It looks like you may be committing a merge./i # ------------------------ >8 ------------------------' "$1" | |
fi | |
;; | |
*) | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment