Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/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
You can’t perform that action at this time.