git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git-send-mail in sh

From
Andreas Ericsson <ae@op5.se>
Date
Nov 26, 2005, 22:35 UTC
Message-ID
<4388E33A.8000004@op5.se>
In-Reply-To
<7vwtiwmvfp.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
Show 13 quoted lines
> Andreas Ericsson <ae@op5.se> writes:
> 
> 
>>It doesn't CC them, but any number of email-addresses can be specified 
>>on the command line (so long as they don't include spaces, but that can 
>>be taken care of).
> 
> 
> Again I do not think I'd ever use that feature from the original
> send-email myself, but the difference is that this CC list
> depends on each commit (sign-offs taken from a commit are
> added to CC list for only that commit).
> 

Had a thinko when I wrote that. I've added --cc-signers, --cc-author and --cc (for both --cc-signers and --cc-author).

> But you are right.  We could make a single <commit> a short-hand
> for "origin"..<commit>;

Actually, I meant that a single <commit> would mean "<commit>..HEAD", like git-format-patch does it. Doing the other way around in a tool so closely coupled would be very confusing, I think.

Here's what I have on disk right now. The ${var##*^} syntax was decided to be portable in some earlier discussion, so I'm sticking with it (mostly because I don't know how to do it with expr and Junio pokes me when I do it with sed. Enlightenment welcome).

if [ "$com2" ]; then
     range="$com1..$com2"
else
     case "$com1" in
         ?*..?*)
             # nicely ranged already
             range="$com1"
             ;;
         ..)
             range=origin..HEAD
             ;;
         ?*^)
             # single commit
             com1="${com1##*^}"
             range="$com1^1..$com1"
             ;;
         ?*^[0-9]|?*^[0-9][0-9])
             # series of commits, ranging back from <commit-ish>
             range="$com1..${com1%%^*}"
             ;;
         ^[0-9]|^[0-9][0-9])
             # series of commits, ranging back from HEAD
             range="HEAD$com1..HEAD"
             ;;
         *)
             range="$com1..HEAD"
             ;;
     esac
fi
-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231
Previous: Junio C HamanoNext: Junio C Hamano
Message 11 of 22 in “git-send-mail in sh”
  1. Andreas EricssonNov 25, 2005
  2. Nikolai WeibullNov 25, 2005
  3. Andreas EricssonNov 25, 2005
  4. Fernando J. PeredaNov 25, 2005
  5. Johannes SchindelinNov 25, 2005
  6. Andreas EricssonNov 25, 2005
  7. A Large Angry SCMNov 25, 2005
  8. Junio C HamanoNov 25, 2005
  9. Andreas EricssonNov 25, 2005
  10. Junio C HamanoNov 25, 2005
  11. Andreas EricssonNov 26, 2005
  12. Junio C HamanoNov 27, 2005
  13. Andreas EricssonNov 27, 2005
  14. Nikolai WeibullNov 28, 2005
  15. Junio C HamanoNov 26, 2005
  16. Yann DirsonNov 26, 2005
  17. Ryan AndersonNov 25, 2005
  18. Andreas EricssonNov 25, 2005
  19. Ryan AndersonNov 28, 2005
  20. Andreas EricssonNov 28, 2005
  21. Junio C HamanoNov 28, 2005
  22. Andreas EricssonNov 29, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.