{"thread":{"id":"9736","subject":"[PATCH] rebase -m: Fix incorrect short-logs of already applied commits.","startedAt":"2007-09-01T07:25:27Z","lastAt":"2007-09-05T18:06:09Z","messageCount":15,"participants":["Johannes Sixt","Junio C Hamano","David Kastrup","Robin Rosenberg","Johannes Schindelin","Simon 'corecode' Schubert","Nix","Benoit SIGOURE"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"52129","messageId":"200709010925.27926.johannes.sixt@telecom.at","threadId":"9736","inReplyTo":null,"subject":"[PATCH] rebase -m: Fix incorrect short-logs of already applied commits.","fromName":"Johannes Sixt","fromEmail":"johannes.sixt@telecom.at","sentAt":"2007-09-01T07:25:27Z","receivedAt":"2007-09-01T07:25:27Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"When a topic branch is rebased, some of whose commits are already\ncherry-picked upstream:\n\n    o--X--A--B--Y    <- master\n     \\\n      A--B--Z        <- topic\n\nthen 'git rebase -m master' would report:\n\n    Already applied: 0001 Y\n    Already applied: 0002 Y\n\nWith this fix it reports the expected:\n\n    Already applied: 0001 A\n    Already applied: 0002 B\n\nAs an added bonus, this change also avoids 'echo' of a commit message,\nwhich might contain escapements.\n\nSigned-off-by: Johannes Sixt <johannes.sixt@telecom.at>\n---\n git-rebase.sh |   13 ++++++++-----\n 1 files changed, 8 insertions(+), 5 deletions(-)\n\ndiff --git a/git-rebase.sh b/git-rebase.sh\nindex cbafa14..9cf0056 100755\n--- a/git-rebase.sh\n+++ b/git-rebase.sh\n@@ -59,20 +59,23 @@ continue_merge () {\n \t\tdie \"$RESOLVEMSG\"\n \tfi\n \n+\tcmt=`cat $dotest/current`\n \tif ! git diff-index --quiet HEAD\n \tthen\n-\t\tif ! git-commit -C \"`cat $dotest/current`\"\n+\t\tif ! git-commit -C \"$cmt\"\n \t\tthen\n \t\t\techo \"Commit failed, please do not call \\\"git commit\\\"\"\n \t\t\techo \"directly, but instead do one of the following: \"\n \t\t\tdie \"$RESOLVEMSG\"\n \t\tfi\n-\t\tprintf \"Committed: %0${prec}d\" $msgnum\n+\t\tprintf \"Committed: %0${prec}d \" $msgnum\n+\t\tgit rev-list --pretty=oneline -1 HEAD | \\\n+\t\t\tsed 's/^[a-f0-9]\\+ //'\n \telse\n-\t\tprintf \"Already applied: %0${prec}d\" $msgnum\n+\t\tprintf \"Already applied: %0${prec}d \" $msgnum\n+\t\tgit rev-list --pretty=oneline -1 \"$cmt\" | \\\n+\t\t\tsed 's/^[a-f0-9]\\+ //'\n \tfi\n-\techo ' '`git rev-list --pretty=oneline -1 HEAD | \\\n-\t\t\t\tsed 's/^[a-f0-9]\\+ //'`\n \n \tprev_head=`git rev-parse HEAD^0`\n \t# save the resulting commit so we can read-tree on it later\n-- \n1.5.3.rc6.55.ga005\n"},{"id":"52131","messageId":"7vmyw6u5ca.fsf@gitster.siamese.dyndns.org","threadId":"9736","inReplyTo":"200709010925.27926.johannes.sixt@telecom.at","subject":"Re: [PATCH] rebase -m: Fix incorrect short-logs of already applied commits.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-09-01T09:01:41Z","receivedAt":"2007-09-01T09:01:41Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Sixt <johannes.sixt@telecom.at> writes:\n\n> When a topic branch is rebased, some of whose commits are already\n> cherry-picked upstream:\n>\n>     o--X--A--B--Y    <- master\n>      \\\n>       A--B--Z        <- topic\n>\n> then 'git rebase -m master' would report:\n>\n>     Already applied: 0001 Y\n>     Already applied: 0002 Y\n>\n> With this fix it reports the expected:\n>\n>     Already applied: 0001 A\n>     Already applied: 0002 B\n\nWell, good eyes.  A new test script would have been nice.\n\n> +\t\tprintf \"Already applied: %0${prec}d \" $msgnum\n> +\t\tgit rev-list --pretty=oneline -1 \"$cmt\" | \\\n> +\t\t\tsed 's/^[a-f0-9]\\+ //'\n\nThis is not your fault but I just noticed this sed script that\nsteps outside BRE [*1*, *2*].  In this case we do not even need\nto use '\\+', as we know what we are reading.\n\nA few \"sed\" disciplines to keep things portable I tried to\nfollow so far are:\n\n - Always use '-e' to introduce expression;\n - Don't use two expressions concatenated with ';' in a single\n   string; multi-line scripts tend to be more portable;\n - Do not use one-or-more \"\\+\", that's not BRE.\n\nI would propose doing the attached patch on top of yours.\nOpinion?\n\n[Footnotes] \n\n*1* http://www.opengroup.org/onlinepubs/000095399/utilities/sed.html\n*2* http://www.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap09.html#tag_09_03\n\n---\n\n git-rebase.sh             |    5 +----\n t/t3406-rebase-message.sh |   44 ++++++++++++++++++++++++++++++++++++++++++++\n 2 files changed, 45 insertions(+), 4 deletions(-)\n\ndiff --git a/git-rebase.sh b/git-rebase.sh\nindex 9cf0056..3bd66b0 100755\n--- a/git-rebase.sh\n+++ b/git-rebase.sh\n@@ -69,13 +69,10 @@ continue_merge () {\n \t\t\tdie \"$RESOLVEMSG\"\n \t\tfi\n \t\tprintf \"Committed: %0${prec}d \" $msgnum\n-\t\tgit rev-list --pretty=oneline -1 HEAD | \\\n-\t\t\tsed 's/^[a-f0-9]\\+ //'\n \telse\n \t\tprintf \"Already applied: %0${prec}d \" $msgnum\n-\t\tgit rev-list --pretty=oneline -1 \"$cmt\" | \\\n-\t\t\tsed 's/^[a-f0-9]\\+ //'\n \tfi\n+\tgit rev-list --pretty=oneline -1 \"$cmt\" | sed -e 's/^[^ ]* //'\n \n \tprev_head=`git rev-parse HEAD^0`\n \t# save the resulting commit so we can read-tree on it later\ndiff --git a/t/t3406-rebase-message.sh b/t/t3406-rebase-message.sh\nnew file mode 100755\nindex 0000000..332b2b2\n--- /dev/null\n+++ b/t/t3406-rebase-message.sh\n@@ -0,0 +1,44 @@\n+#!/bin/sh\n+\n+test_description='messages from rebase operation'\n+\n+. ./test-lib.sh\n+\n+quick_one () {\n+\techo \"$1\" >\"file$1\" &&\n+\tgit add \"file$1\" &&\n+\ttest_tick &&\n+\tgit commit -m \"$1\"\n+}\n+\n+test_expect_success setup '\n+\tquick_one O &&\n+\tgit branch topic &&\n+\tquick_one X &&\n+\tquick_one A &&\n+\tquick_one B &&\n+\tquick_one Y &&\n+\n+\tgit checkout topic &&\n+\tquick_one A &&\n+\tquick_one B &&\n+\tquick_one Z\n+\n+'\n+\n+cat >expect <<\\EOF\n+Already applied: 0001 A\n+Already applied: 0002 B\n+Committed: 0003 Z\n+EOF\n+\n+test_expect_success 'rebase -m' '\n+\n+\tgit rebase -m master >report &&\n+\tsed -n -e \"/^Already applied: /p\" \\\n+\t\t-e \"/^Committed: /p\" report >actual &&\n+\tdiff -u expect actual\n+\n+'\n+\n+test_done\n"},{"id":"52132","messageId":"7vejhiu565.fsf_-_@gitster.siamese.dyndns.org","threadId":"9736","inReplyTo":"7vmyw6u5ca.fsf@gitster.siamese.dyndns.org","subject":"[PATCH] rebase--interactive: do not use one-or-more (\\+) in sed.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-09-01T09:05:22Z","receivedAt":"2007-09-01T09:05:22Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"This is a continuation of the other one to avoid one-or-more operator\nin sed.  At the same time, it actually tightens error checking,\nbecause the numbers in the squash messages are not padded with\nleading zero and cannot begin with 0.\n\nWith this, I think we do not have any more use of one-or-more\n(\\+) in sed scripts.\n\n---\n\n git-rebase--interactive.sh |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh\nindex ec798a1..abc2b1c 100755\n--- a/git-rebase--interactive.sh\n+++ b/git-rebase--interactive.sh\n@@ -190,7 +190,7 @@ nth_string () {\n \n make_squash_message () {\n \tif test -f \"$SQUASH_MSG\"; then\n-\t\tCOUNT=$(($(sed -n \"s/^# This is [^0-9]*\\([0-9]\\+\\).*/\\1/p\" \\\n+\t\tCOUNT=$(($(sed -n \"s/^# This is [^0-9]*\\([1-9][0-9]*\\).*/\\1/p\" \\\n \t\t\t< \"$SQUASH_MSG\" | tail -n 1)+1))\n \t\techo \"# This is a combination of $COUNT commits.\"\n \t\tsed -n \"2,\\$p\" < \"$SQUASH_MSG\"\n"},{"id":"52133","messageId":"85ps12agiz.fsf@lola.goethe.zz","threadId":"9736","inReplyTo":"7vmyw6u5ca.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] rebase -m: Fix incorrect short-logs of already applied commits.","fromName":"David Kastrup","fromEmail":"dak@gnu.org","sentAt":"2007-09-01T09:20:20Z","receivedAt":"2007-09-01T09:20:20Z","isPatch":true,"sender":{"key":"dak@gnu.org","avatar":"https://avatars.githubusercontent.com/u/52141349?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> I would propose doing the attached patch on top of yours.\n> Opinion?\n>\n> +\tgit rev-list --pretty=oneline -1 \"$cmt\" | sed -e 's/^[^ ]* //'\n\nWhat about\n\n    git-rev-list --pretty=format:%s -1 \"$cmt\"\n\nIt seems pretty pointless to first print with a wrong format, then fix\nit up afterwards.\n\nIncidentally, the above spews out a full commit line before the entry\n(meaning this does not work with current git-rev-list).  This is\narguably wrong: when format: is employed, the user presumably knows\nperfectly well what he wants printed.\n\nSo I guess I vouch for both not using sed as well as what I consider\nfixing git-rev-list --pretty=format:\n\n-- \nDavid Kastrup, Kriemhildstr. 15, 44793 Bochum\n"},{"id":"52143","messageId":"200709011406.25965.johannes.sixt@telecom.at","threadId":"9736","inReplyTo":"7vmyw6u5ca.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] rebase -m: Fix incorrect short-logs of already applied commits.","fromName":"Johannes Sixt","fromEmail":"johannes.sixt@telecom.at","sentAt":"2007-09-01T12:06:25Z","receivedAt":"2007-09-01T12:06:25Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"On Saturday 01 September 2007 11:01, Junio C Hamano wrote:\n>  \t\tprintf \"Committed: %0${prec}d \" $msgnum\n> -\t\tgit rev-list --pretty=oneline -1 HEAD | \\\n> -\t\t\tsed 's/^[a-f0-9]\\+ //'\n>  \telse\n>  \t\tprintf \"Already applied: %0${prec}d \" $msgnum\n> -\t\tgit rev-list --pretty=oneline -1 \"$cmt\" | \\\n> -\t\t\tsed 's/^[a-f0-9]\\+ //'\n>  \tfi\n> +\tgit rev-list --pretty=oneline -1 \"$cmt\" | sed -e 's/^[^ ]* //'\n\nI prefer this over my version as well.\n\n-- Hannes\n"},{"id":"52144","messageId":"200709011411.10915.robin.rosenberg.lists@dewire.com","threadId":"9736","inReplyTo":"200709010925.27926.johannes.sixt@telecom.at","subject":"Re: [PATCH] rebase -m: Fix incorrect short-logs of already applied commits.","fromName":"Robin Rosenberg","fromEmail":"robin.rosenberg.lists@dewire.com","sentAt":"2007-09-01T12:11:10Z","receivedAt":"2007-09-01T12:11:10Z","isPatch":true,"sender":{"key":"robin.rosenberg@dewire.com","avatar":"https://avatars.githubusercontent.com/u/46357?v=4"},"body":"\nJust so we know what the '-m' is from the documentation.\n\n-- robin\n\n>From b4fd5fca1aa45183c04327a29ee98d01a4e76e59 Mon Sep 17 00:00:00 2001\nFrom: Robin Rosenberg <robin.rosenberg@dewire.com>\nDate: Sat, 1 Sep 2007 13:52:26 +0200\nSubject: [PATCH] Mention -m as an abbreviation for --merge\n\nSigned-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>\n---\n Documentation/git-rebase.txt |    4 ++--\n 1 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt\nindex a1b6dce..cb87b03 100644\n--- a/Documentation/git-rebase.txt\n+++ b/Documentation/git-rebase.txt\n@@ -8,7 +8,7 @@ git-rebase - Forward-port local commits to the updated upstream head\n SYNOPSIS\n --------\n [verse]\n-'git-rebase' [-i | --interactive] [-v | --verbose] [--merge] [-C<n>]\n+'git-rebase' [-i | --interactive] [-v | --verbose] [-m | --merge] [-C<n>]\n \t[-p | --preserve-merges] [--onto <newbase>] <upstream> [<branch>]\n 'git-rebase' --continue | --skip | --abort\n \n@@ -188,7 +188,7 @@ OPTIONS\n --skip::\n \tRestart the rebasing process by skipping the current patch.\n \n---merge::\n+-m, \\--merge::\n \tUse merging strategies to rebase.  When the recursive (default) merge\n \tstrategy is used, this allows rebase to be aware of renames on the\n \tupstream side.\n-- \n1.5.3.rc7.844.gfd3c5\n"},{"id":"52155","messageId":"Pine.LNX.4.64.0709012324240.28586@racer.site","threadId":"9736","inReplyTo":"7vejhiu565.fsf_-_@gitster.siamese.dyndns.org","subject":"Re: [PATCH] rebase--interactive: do not use one-or-more (\\+) in sed.","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-09-01T22:24:39Z","receivedAt":"2007-09-01T22:24:39Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Sat, 1 Sep 2007, Junio C Hamano wrote:\n\n> This is a continuation of the other one to avoid one-or-more operator\n> in sed.  At the same time, it actually tightens error checking,\n> because the numbers in the squash messages are not padded with\n> leading zero and cannot begin with 0.\n> \n> With this, I think we do not have any more use of one-or-more\n> (\\+) in sed scripts.\n> \n> ---\n> \n>  git-rebase--interactive.sh |    2 +-\n>  1 files changed, 1 insertions(+), 1 deletions(-)\n> \n> diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh\n> index ec798a1..abc2b1c 100755\n> --- a/git-rebase--interactive.sh\n> +++ b/git-rebase--interactive.sh\n> @@ -190,7 +190,7 @@ nth_string () {\n>  \n>  make_squash_message () {\n>  \tif test -f \"$SQUASH_MSG\"; then\n> -\t\tCOUNT=$(($(sed -n \"s/^# This is [^0-9]*\\([0-9]\\+\\).*/\\1/p\" \\\n> +\t\tCOUNT=$(($(sed -n \"s/^# This is [^0-9]*\\([1-9][0-9]*\\).*/\\1/p\" \\\n\nLooks obviously correct to me... Ack.\n\nCiao,\nDscho\n"},{"id":"52169","messageId":"85abs5v9q1.fsf@lola.goethe.zz","threadId":"9736","inReplyTo":"7vejhiu565.fsf_-_@gitster.siamese.dyndns.org","subject":"Re: [PATCH] rebase--interactive: do not use one-or-more (\\+) in sed.","fromName":"David Kastrup","fromEmail":"dak@gnu.org","sentAt":"2007-09-02T06:53:58Z","receivedAt":"2007-09-02T06:53:58Z","isPatch":true,"sender":{"key":"dak@gnu.org","avatar":"https://avatars.githubusercontent.com/u/52141349?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> This is a continuation of the other one to avoid one-or-more operator\n> in sed.  At the same time, it actually tightens error checking,\n> because the numbers in the squash messages are not padded with\n> leading zero and cannot begin with 0.\n>\n> With this, I think we do not have any more use of one-or-more\n> (\\+) in sed scripts.\n\nJust for the record: I believe that \\{1,\\} might be portable.\n\nAs usual, <URL:info:autoconf#Limitations%20of%20Usual%20Tools> (aka as\n(info \"(autoconf) Limitations of Usual Tools\")\n) provides a real horror show of sed variants.\n\nActually, one can get the cursor right on the spot by typing\ninfo autoconf      (or the respective Emacs command C-h i g (autoconf))\ni sed RET\n\nThere is something to be said for well-indexed documentation...\n\n-- \nDavid Kastrup, Kriemhildstr. 15, 44793 Bochum\n"},{"id":"52171","messageId":"7vfy1xr1lz.fsf@gitster.siamese.dyndns.org","threadId":"9736","inReplyTo":"85abs5v9q1.fsf@lola.goethe.zz","subject":"Re: [PATCH] rebase--interactive: do not use one-or-more (\\+) in sed.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-09-02T07:02:48Z","receivedAt":"2007-09-02T07:02:48Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"David Kastrup <dak@gnu.org> writes:\n\n> Just for the record: I believe that \\{1,\\} might be portable.\n\nYeah, I obviously looked at the page I quoted that describes\nwhat's in and what's not in BRE definition ;-)\n\nBut in practice, I do not recall ever seeing an older sed that\ndid not understand one-or-more \\+ *and* understood \\{1,\\}.  Do\nyou?\n\nI had to deal with autoconf (hence various flavours of UNIX\nimplementations) in my previous life, but that was an ancient\nhistory (back then the effect of SysV vs BSD war was still\nfelt).  As a maintainer of a public project I understand you\nhave to deal with the current set of variations, and you might\nknow better than me about the current portability situation.\n"},{"id":"52173","messageId":"85zm05ttxz.fsf@lola.goethe.zz","threadId":"9736","inReplyTo":"7vfy1xr1lz.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] rebase--interactive: do not use one-or-more (\\+) in sed.","fromName":"David Kastrup","fromEmail":"dak@gnu.org","sentAt":"2007-09-02T07:20:08Z","receivedAt":"2007-09-02T07:20:08Z","isPatch":true,"sender":{"key":"dak@gnu.org","avatar":"https://avatars.githubusercontent.com/u/52141349?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> David Kastrup <dak@gnu.org> writes:\n>\n>> Just for the record: I believe that \\{1,\\} might be portable.\n>\n> Yeah, I obviously looked at the page I quoted that describes\n> what's in and what's not in BRE definition ;-)\n\n> As a maintainer of a public project I understand you have to deal\n> with the current set of variations, and you might know better than\n> me about the current portability situation.\n\nDon't ask.  That was what \"just for the record\" was about.  In\npractice, one uses the most simplistic expressions (and then some) and\nprays, and your patches are quite in line with that.\n\nBasically, one has to bear up under attack from two sides: the Windows\nside with its idiosyncratic file names (and habitual spaces) under the\nCygwin and MSYS environments (which are quite Posix and GNU), and the\nnon-Posix madness from all sorts of Unices all across the utilities.\n\n-- \nDavid Kastrup, Kriemhildstr. 15, 44793 Bochum\n"},{"id":"52195","messageId":"46DABD15.4030208@fs.ei.tum.de","threadId":"9736","inReplyTo":"7vfy1xr1lz.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] rebase--interactive: do not use one-or-more (\\+) in sed.","fromName":"Simon 'corecode' Schubert","fromEmail":"corecode@fs.ei.tum.de","sentAt":"2007-09-02T13:39:33Z","receivedAt":"2007-09-02T13:39:33Z","isPatch":true,"sender":{"key":"corecode@fs.ei.tum.de","avatar":"https://gravatar.com/avatar/eff9dbf0cdac0d1e6a6cd7ed0e50763edcb376b493b5253a35ff167918ad79e1?d=mp&s=160"},"body":"Junio C Hamano wrote:\n>> Just for the record: I believe that \\{1,\\} might be portable.\n> \n> Yeah, I obviously looked at the page I quoted that describes\n> what's in and what's not in BRE definition ;-)\n> \n> But in practice, I do not recall ever seeing an older sed that\n> did not understand one-or-more \\+ *and* understood \\{1,\\}.  Do\n> you?\n\nYes, BSD sed (at least DragonFly's, so probably as well FreeBSD-4 (dunno \nabout later)):\n\nchlamydia % echo 5ab123x | sed -e 's/[a-z]\\+/AAA/' \n\n5ab123x\nchlamydia % echo 5ab123x | sed -e 's/[a-z]\\{1,\\}/AAA/' \n\n5AAA123x\nchlamydia % echo 5ab123x | sed -E -e 's/[a-z]+/AAA/' \n\n5AAA123x\n\ncheers\n   simon\n"},{"id":"52197","messageId":"Pine.LNX.4.64.0709021518260.28586@racer.site","threadId":"9736","inReplyTo":"46DABD15.4030208@fs.ei.tum.de","subject":"Re: [PATCH] rebase--interactive: do not use one-or-more (\\+) in sed.","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-09-02T14:20:52Z","receivedAt":"2007-09-02T14:20:52Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Sun, 2 Sep 2007, Simon 'corecode' Schubert wrote:\n\n> Junio C Hamano wrote:\n> > > Just for the record: I believe that \\{1,\\} might be portable.\n> > \n> > Yeah, I obviously looked at the page I quoted that describes\n> > what's in and what's not in BRE definition ;-)\n> > \n> > But in practice, I do not recall ever seeing an older sed that\n> > did not understand one-or-more \\+ *and* understood \\{1,\\}.  Do\n> > you?\n> \n> Yes, BSD sed (at least DragonFly's, so probably as well FreeBSD-4 (dunno\n> about later)):\n> \n> chlamydia % echo 5ab123x | sed -e 's/[a-z]\\+/AAA/' \n> 5ab123x\n> chlamydia % echo 5ab123x | sed -e 's/[a-z]\\{1,\\}/AAA/' \n> 5AAA123x\n> chlamydia % echo 5ab123x | sed -E -e 's/[a-z]+/AAA/' \n> 5AAA123x\n\nThank you for a proper argument.  I usually ignore hand-waving POSIX \narguments, but a real-world case changes the situation.\n\nCiao,\nDscho\n"},{"id":"52239","messageId":"87bqclngh6.fsf@hades.wkstn.nix","threadId":"9736","inReplyTo":"85abs5v9q1.fsf@lola.goethe.zz","subject":"Re: [PATCH] rebase--interactive: do not use one-or-more (\\+) in sed.","fromName":"Nix","fromEmail":"nix@esperi.org.uk","sentAt":"2007-09-02T17:07:33Z","receivedAt":"2007-09-02T17:07:33Z","isPatch":true,"sender":{"key":"nix@esperi.org.uk","avatar":"https://avatars.githubusercontent.com/u/6503005?v=4"},"body":"On 2 Sep 2007, David Kastrup uttered the following:\n> As usual, <URL:info:autoconf#Limitations%20of%20Usual%20Tools> (aka as\n> (info \"(autoconf) Limitations of Usual Tools\")\n> ) provides a real horror show of sed variants.\n\nA goodly number of things in that section of the Autoconf manual are\npassing on hints and ancient legends that may or may not be accurate:\nI've found a number of its descriptions of shell limitations to be\ndownright wrong (applying to one build of one shell back in 1981 that\nwas never shipped to anyone, that sort of thing).\n\n(Of course it's valuable, even if it *is* a compendium of legends. But\nconfirming any of it is quite hard.)\n"},{"id":"52601","messageId":"6E4416B2-FA7C-47C3-B5C6-9E94D8ABE17D@lrde.epita.fr","threadId":"9736","inReplyTo":"87bqclngh6.fsf@hades.wkstn.nix","subject":"Re: [PATCH] rebase--interactive: do not use one-or-more (\\+) in sed.","fromName":"Benoit SIGOURE","fromEmail":"tsuna@lrde.epita.fr","sentAt":"2007-09-05T17:54:32Z","receivedAt":"2007-09-05T17:54:32Z","isPatch":true,"sender":{"key":"tsunanet@gmail.com","avatar":"https://avatars.githubusercontent.com/u/128281?v=4"},"body":"On Sep 2, 2007, at 7:07 PM, Nix wrote:\n\n> On 2 Sep 2007, David Kastrup uttered the following:\n>> As usual, <URL:info:autoconf#Limitations%20of%20Usual%20Tools>  \n>> (aka as\n>> (info \"(autoconf) Limitations of Usual Tools\")\n>> ) provides a real horror show of sed variants.\n>\n> A goodly number of things in that section of the Autoconf manual are\n> passing on hints and ancient legends that may or may not be accurate:\n> I've found a number of its descriptions of shell limitations to be\n> downright wrong (applying to one build of one shell back in 1981 that\n> was never shipped to anyone, that sort of thing).\n>\n> (Of course it's valuable, even if it *is* a compendium of legends. But\n> confirming any of it is quite hard.)\n\nThe autoconf maintainers will be glade to hear about such legends or  \ninaccurate things.\n\nCheers,\n\n-- \nBenoit Sigoure aka Tsuna\nEPITA Research and Development Laboratory\n\n\n"},{"id":"52603","messageId":"87bqch0yy6.fsf@hades.wkstn.nix","threadId":"9736","inReplyTo":"6E4416B2-FA7C-47C3-B5C6-9E94D8ABE17D@lrde.epita.fr","subject":"Re: [PATCH] rebase--interactive: do not use one-or-more (\\+) in sed.","fromName":"Nix","fromEmail":"nix@esperi.org.uk","sentAt":"2007-09-05T18:06:09Z","receivedAt":"2007-09-05T18:06:09Z","isPatch":true,"sender":{"key":"nix@esperi.org.uk","avatar":"https://avatars.githubusercontent.com/u/6503005?v=4"},"body":"On 5 Sep 2007, Benoit SIGOURE told this:\n> The autoconf maintainers will be glade to hear about such legends or  inaccurate things.\n\nI know, and when I finally dig up my list (it's on an old CD somewhere)\nI'll send it their way. (Disk crash -> lots of stuff still stuck on CDs\nyears after the fact... obviously I should have kept everything\nsignificant in git instead so I just had to restore one packfile ;) )\n"}]}