Guest User

Untitled

a guest
Jun 21st, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. if [ "$2$3" = "" ]; then
  4. git ls-files --stage $(git diff --cached --name-only) | grep '^160000 ' |
  5. while read mode sha1 stage path
  6. do
  7. msg=`cd $path; git --no-pager log -1 --pretty=%s`
  8. echo "1a\n * `basename $path`: $msg\n.\nw" | ed "$1"
  9. done
  10. fi
Add Comment
Please, Sign In to add comment