Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/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
Add Comment
Please, Sign In to add comment