All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Ericsson <ae@op5.se>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: Re: git-send-mail in sh
Date: Mon, 28 Nov 2005 00:34:03 +0100	[thread overview]
Message-ID: <438A426B.7070607@op5.se> (raw)
In-Reply-To: <7v4q5xbvip.fsf@assigned-by-dhcp.cox.net>

Junio C Hamano wrote:
> Andreas Ericsson <ae@op5.se> writes:
> 
>>            # single commit
>>            com1="${com1##*^}"
>>            range="$com1^1..$com1"
>>            ;;
> 
> 
> I wonder if you meant "${com1%^}" here, to remove the trailing '^'.
> 

I did/do/done. :)

> 
>>        ?*^[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"
>>            ;;
> 
> 
> N generation back in extended SHA1 notation uses a tilde '~',


I just noticed that after sending the original email. I've changed it to 
take tilde instead.

> Also limiting to between 0 and 99
> generations misinterprets "HEAD~123".
> 
> Although checking only the letter that follows the tilde is a
> digit mistakenly accepts something like "master~1-bad-one", that
> is already malformed and whatever comes downstream would barf,
> so that may be fine.  How about something like:
> 
> 	?*'~'[1-9]*)
>         	range="$com1..${com1%~*}" ;;
> 	'~'[1-9]*)
>         	range="HEAD$com1..HEAD" ;;
> 

Fine by me, although that 99 patches limit was sort of semi-intentional. 
Doing it this way makes case order matter since
	?*'~'[1-9]*

will also match

	<commit>~3..HEAD

I'll stick with your way though and put a comment there so people don't 
touch the ordering.


Thanks for the expr lesson btw.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

  reply	other threads:[~2005-11-27 23:34 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-25  9:45 git-send-mail in sh Andreas Ericsson
2005-11-25 10:12 ` Nikolai Weibull
2005-11-25 10:59   ` Andreas Ericsson
2005-11-25 11:06     ` Fernando J. Pereda
2005-11-25 11:05 ` Johannes Schindelin
2005-11-25 14:25   ` Andreas Ericsson
2005-11-25 17:20     ` A Large Angry SCM
2005-11-25 11:15 ` Junio C Hamano
2005-11-25 17:26   ` Andreas Ericsson
2005-11-25 18:30     ` Junio C Hamano
2005-11-26 22:35       ` Andreas Ericsson
2005-11-27 22:01         ` Junio C Hamano
2005-11-27 23:34           ` Andreas Ericsson [this message]
2005-11-28  0:15           ` Nikolai Weibull
2005-11-26 20:12     ` Junio C Hamano
2005-11-26 23:34   ` Yann Dirson
2005-11-25 16:33 ` Ryan Anderson
2005-11-25 17:04   ` Andreas Ericsson
2005-11-28  0:49     ` Ryan Anderson
2005-11-28  9:02       ` Andreas Ericsson
2005-11-28  9:34         ` Junio C Hamano
2005-11-29 13:04           ` Andreas Ericsson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=438A426B.7070607@op5.se \
    --to=ae@op5.se \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.