Advertisement
Guest User

Untitled

a guest
Dec 29th, 2022
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. # git_send_email [--cc=ARG] files
  2. git_send_email() {
  3. local files
  4. local cc=""
  5.  
  6. if [[ "$1" == --cc* ]] || [[ "$1" == --to* ]]; then
  7. cc="$1"
  8. shift
  9. fi
  10.  
  11. files="$*"
  12. test -n "$files" || return 1
  13.  
  14. # Do not use --to-cmd because it collects addresses per each email.
  15. # Instead need to collect addressesonce and use them for entire set.
  16. if [ "$cc" == "" ]; then
  17. git send-email --to="$(scripts/get_maintainer.pl --no-multiline --separator=, --no-git --no-roles --no-rolestats --no-git-fallback $files)" \
  18. --cc linux-kernel@vger.kernel.org $files
  19. else
  20. git send-email "$cc" --to="$(scripts/get_maintainer.pl --no-multiline --separator=, --no-git --no-roles --no-rolestats --no-git-fallback $files)" \
  21. --cc linux-kernel@vger.kernel.org $files
  22. fi
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement