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

Re: [PATCH 3/3] Add a command "fix" to rebase --interactive.

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Dec 4, 2009, 17:44 UTC
Message-ID
<vpqaaxyocr4.fsf@bauges.imag.fr>
In-Reply-To
<7v638mskmx.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 17 quoted lines
> Michael Haggerty <mhagger@alum.mit.edu> writes:
>
>> diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
>> index 0bd3bf7..539413d 100755
>> --- a/git-rebase--interactive.sh
>> +++ b/git-rebase--interactive.sh
>> @@ -302,7 +302,7 @@ nth_string () {
>>  
>>  make_squash_message () {
>>  	if test -f "$SQUASH_MSG"; then
>> -		COUNT=$(($(sed -n "s/^# This is [^0-9]*\([1-9][0-9]*\).*/\1/p" \
>> +		COUNT=$(($(sed -n "s/^# Th[^0-9]*\([1-9][0-9]*\)\(th\|st\|nd\|rd\) commit message.*:/\1/p" \
>>  			< "$SQUASH_MSG" | sed -ne '$p')+1))
>
> This sed replacement worries me.  I don't have a time to check myself
> today but do we use \(this\|or\|that\) alternates with our sed script
> already elsewhere in the codebase (test scripts do not count)?
It seems we don't:

git$ git grep '\\|' *.sh git-rebase--interactive.sh: COUNT=$(($(sed -n "s/^# Th[^0-9]*\([1-9][0-9]*\)\(th\|st\|nd\|rd\) commit message.*:/\ git$

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Junio C HamanoNext: Johannes Schindelin
Message 10 of 32 in “Add a "fix" command to "rebase --interactive"”
  1. 0/3 Add a "fix" command to "rebase --interactive"Michael Haggerty, Dec 4, 2009
  2. 1/3 Better document the original repository layout.Michael Haggerty, Dec 4, 2009
  3. Michael J GruberDec 4, 2009
  4. Johannes SchindelinDec 4, 2009
  5. 2/3 Set a couple more tags in the original repository.Michael Haggerty, Dec 4, 2009
  6. Johannes SchindelinDec 4, 2009
  7. 3/3 Add a command "fix" to rebase --interactive.Michael Haggerty, Dec 4, 2009
  8. Johannes SchindelinDec 4, 2009
  9. Junio C HamanoDec 4, 2009
  10. Matthieu MoyDec 4, 2009
  11. Johannes SchindelinDec 4, 2009
  12. Junio C HamanoDec 5, 2009
  13. Michael J GruberDec 4, 2009
  14. Matthieu MoyDec 4, 2009
  15. Junio C HamanoDec 4, 2009
  16. Johannes SchindelinDec 4, 2009
  17. Nanako ShiraishiDec 4, 2009
  18. Junio C HamanoDec 5, 2009
  19. Nanako ShiraishiDec 8, 2009
  20. Junio C HamanoDec 8, 2009
  21. Nanako ShiraishiDec 8, 2009
  22. Junio C HamanoDec 8, 2009
  23. Junio C HamanoDec 8, 2009
  24. Jeff KingDec 8, 2009
  25. Sverre RabbelierDec 8, 2009
  26. Nanako ShiraishiDec 9, 2009
  27. Aaron CohenDec 9, 2009
  28. Junio C HamanoDec 9, 2009
  29. Matthieu MoyDec 8, 2009
  30. Shawn O. PearceDec 4, 2009
  31. Björn GustavssonDec 4, 2009
  32. Junio C HamanoDec 4, 2009

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.