Created
November 8, 2010 10:51
-
-
Save motemen/667569 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 | |
if [ "$2$3" = "" ]; then | |
git ls-files --stage $(git diff --cached --name-only) | grep '^160000 ' | | |
while read mode sha1 stage path | |
do | |
msg=`cd $path; git --no-pager log -1 --pretty=%s` | |
echo "1a\n * `basename $path`: $msg\n.\nw" | ed "$1" | |
done | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment