{"thread":{"id":"763","subject":"[COGITO PATCH] Fix cg-log and cg-status for non-GNU sed/sort","startedAt":"2005-05-29T23:00:10Z","lastAt":"2005-05-31T01:19:25Z","messageCount":6,"participants":["Mark Allen","Petr Baudis","Alecs King"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"4204","messageId":"20050529230011.30885.qmail@web41201.mail.yahoo.com","threadId":"763","inReplyTo":null,"subject":"[COGITO PATCH] Fix cg-log and cg-status for non-GNU sed/sort","fromName":"Mark Allen","fromEmail":"mrallen1@yahoo.com","sentAt":"2005-05-29T23:00:10Z","receivedAt":"2005-05-29T23:00:10Z","isPatch":true,"sender":{"key":"mrallen1@yahoo.com","avatar":null},"body":"Here're a couple of pretty simple patches against cg-log and cg-status (two cogito\ncommands I use a lot) for the non-GNU (or at least older, forked GNU) tools on Darwin.\n\nThere's also a non-GNU sed problem in cg-commit, but I haven't quite figured a good way\nto tackle this issue yet. (The problem is in the regex stripping leading and trailing\nnewlines from $LOGMSG at line 170. Darwin's sed does not like the embedded curly braces,\nbut there's not a good simple way to rewrite this and retain the meaning of the \"sedlet\"\nthat tracks whether its seen any text yet.)\n\nCheers,\n\n--Mark\n\n\n---\ncommit e43fc64b1f779b1ecf1bcc36e4f89a9f43ab2fb6\ntree 95770616edbd49c71dff9ca6e51e7abf449d35e7\nparent d36ed1fd011d349ea2adc00456750b5b3da3a9cd\nauthor Mark Allen <mrallen1@yahoo.com> 1117406652 -0500\ncommitter Mark Allen <mallen@aeris.local> 1117406652 -0500\n\n cg-log    |   13 +++++--------\n cg-status |    2 +-\n 2 files changed, 6 insertions(+), 9 deletions(-)\n\nIndex: cg-log\n===================================================================\n--- 3a65f5fb53367c75f4f76aebed27a83d8679f068/cg-log  (mode:100755)\n+++ 95770616edbd49c71dff9ca6e51e7abf449d35e7/cg-log  (mode:100755)\n@@ -148,10 +148,10 @@\n \t\t\t\tfi\n \n \t\t\t\tdate=(${rest#*> })\n-\t\t\t\tpdate=\"$(showdate $date)\"\n+\t\t\t\tpdate=\"$(date -u -r $date)\"\n \t\t\t\tif [ \"$pdate\" ]; then\n-\t\t\t\t\techo -n $color$key $rest | sed \"s/>.*/> $pdate/\"\n-\t\t\t\t\techo $coldefault\n+\t\t\t\t\techo -n $color$key $rest | sed \"s/>.*/> $pdate/\" \n+\t\t\t\t\techo -n $coldefault\n \t\t\t\telse\n \t\t\t\t\techo $color$key $rest $coldefault\n \t\t\t\tfi\n@@ -168,11 +168,8 @@\n \t\t\t\tif [ -n \"$list_files\" ]; then\n \t\t\t\t\tlist_commit_files \"$tree1\" \"$tree2\"\n \t\t\t\tfi\n-\t\t\t\techo; sed -re '\n-\t\t\t\t\t/ *Signed-off-by:.*/Is//'$colsignoff'&'$coldefault'/\n-\t\t\t\t\t/ *Acked-by:.*/Is//'$colsignoff'&'$coldefault'/\n-\t\t\t\t\ts/./    &/\n-\t\t\t\t'\n+\t\t\t\techo; sed -e \"/ *Signed-off-by:.*/s/ *Signed-off-by:.*/$colsignoff&$coldefault/\" -e\"/ *Acked-by:.*/s/ *Acked-by:.*/$colsignoff&$coldefault/\" -e \"s/./    &/\"\n+\t\t\t\t\n \t\t\t\t;;\n \t\t\t*)\n \t\t\t\techo $colheader$key $rest $coldefault\nIndex: cg-status\n===================================================================\n--- 3a65f5fb53367c75f4f76aebed27a83d8679f068/cg-status  (mode:100755)\n+++ 95770616edbd49c71dff9ca6e51e7abf449d35e7/cg-status  (mode:100755)\n@@ -15,7 +15,7 @@\n \n {\n \tgit-ls-files -z -t --others --deleted --unmerged $EXCLUDE\n-} | sort -z -k 2 | xargs -0 sh -c '\n+} | sort -t '\\0' -k 2 | xargs -0 sh -c '\n while [ \"$1\" ]; do\n \ttag=${1% *};\n \tfilename=${1#* };\n"},{"id":"4209","messageId":"20050529231652.GX1036@pasky.ji.cz","threadId":"763","inReplyTo":"20050529230011.30885.qmail@web41201.mail.yahoo.com","subject":"Re: [COGITO PATCH] Fix cg-log and cg-status for non-GNU sed/sort","fromName":"Petr Baudis","fromEmail":"pasky@ucw.cz","sentAt":"2005-05-29T23:16:52Z","receivedAt":"2005-05-29T23:16:52Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Mon, May 30, 2005 at 01:00:10AM CEST, I got a letter\nwhere Mark Allen <mrallen1@yahoo.com> told me that...\n> Here're a couple of pretty simple patches against cg-log and cg-status (two cogito\n> commands I use a lot) for the non-GNU (or at least older, forked GNU) tools on Darwin.\n\n> @@ -148,10 +148,10 @@\n>                                 fi\n> \n>                                 date=(${rest#*> })\n> -                               pdate=\"$(showdate $date)\"\n> +                               pdate=\"$(date -u -r $date)\"\n\nHmm, coudlnt' showdate be fixed instead then? And $date is not a file so\n-r $date makes no sense to me - what am I missing?\n\n>                                 if [ \"$pdate\" ]; then\n> -                                       echo -n $color$key $rest | sed \"s/>.*/> $pdate/\"\n> -                                       echo $coldefault\n> +                                       echo -n $color$key $rest | sed \"s/>.*/> $pdate/\"\n> +                                       echo -n $coldefault\n\nI'm lost on this one too. Why do you introduce the -n?\n\n>                                 else\n>                                         echo $color$key $rest $coldefault\n>                                 fi\n> @@ -168,11 +168,8 @@\n>                                 if [ -n \"$list_files\" ]; then\n>                                         list_commit_files \"$tree1\" \"$tree2\"\n>                                 fi\n> -                               echo; sed -re '\n> -                                       / *Signed-off-by:.*/Is//'$colsignoff'&'$coldefault'/\n> -                                       / *Acked-by:.*/Is//'$colsignoff'&'$coldefault'/\n> -                                       s/./    &/\n> -                               '\n> +                               echo; sed -e \"/ *Signed-off-by:.*/s/ *Signed-off-by:.*/$colsignoff&$coldefault/\" -e\"/\n> +*Acked-by:.*/s/ *Acked-by:.*/$colsignoff&$coldefault/\" -e \"s/./    &/\"\n> +\n\nIs it necessary to take away the newlines? What is the real problem,\nactually? Just the I flag?\n\nCould you please sign the patch off, and send it as text/plain or inline the\nmessage body?\n\nThanks,\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nC++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor\n"},{"id":"4212","messageId":"20050529234326.12407.qmail@web41203.mail.yahoo.com","threadId":"763","inReplyTo":"20050529231652.GX1036@pasky.ji.cz","subject":"Re: [COGITO PATCH] Fix cg-log and cg-status for non-GNU sed/sort","fromName":"Mark Allen","fromEmail":"mrallen1@yahoo.com","sentAt":"2005-05-29T23:43:26Z","receivedAt":"2005-05-29T23:43:26Z","isPatch":true,"sender":{"key":"mrallen1@yahoo.com","avatar":null},"body":"--- Petr Baudis <pasky@ucw.cz> wrote:\n> Dear diary, on Mon, May 30, 2005 at 01:00:10AM CEST, I got a letter\n> where Mark Allen <mrallen1@yahoo.com> told me that...\n> > -                               pdate=\"$(showdate $date)\"\n> > +                               pdate=\"$(date -u -r $date)\"\n> \n> Hmm, coudlnt' showdate be fixed instead then? And $date is not a file so\n> -r $date makes no sense to me - what am I missing?\n\nThere is no showdate(1) command on Darwin.  On Darwin, the date(1) command flags are\n\n-u (show UTC)\n-r seconds \n\nSo `date -u -r $date` gives output like \"Sun May 29 12:07:55 GMT 2005\" instead of\n1117336545\n\n> I'm lost on this one too. Why do you introduce the -n?\n\nSince I used date(1) above, I get an extra newline now when the date string is printed\nout. Using echo -n on the second echo stops that behavior. (This is perhaps a matter of \ntaste; some people like lots of whitespace in headers, and some don't.)\n\n> > -                               echo; sed -re '\n> > -                                       /\n> *Signed-off-by:.*/Is//'$colsignoff'&'$coldefault'/\n> > -                                       /\n> *Acked-by:.*/Is//'$colsignoff'&'$coldefault'/\n> > -                                       s/./    &/\n> > -                               '\n> > +                               echo; sed -e \"/ *Signed-off-by:.*/s/\n> *Signed-off-by:.*/$colsignoff&$coldefault/\" -e\"/\n> > +*Acked-by:.*/s/ *Acked-by:.*/$colsignoff&$coldefault/\" -e \"s/./    &/\"\n> > +\n> \n> Is it necessary to take away the newlines? What is the real problem,\n> actually? Just the I flag?\n\nIs it strictly necessary to take away the newlines? I don't know. To be honest, I didn't \nexperiment too much with alternate implementations. But the I flag in the sed script, \nyes that is not understood by non-GNU sed. And the \"-r\" to sed itself is also\nproblematic.\n\n> Could you please sign the patch off, and send it as text/plain or inline the\n> message body?\n\n\nModify cg-log and cg-status to work with non-GNU sed, sort and date\n\nSigned-off-by: Mark Allen <mrallen1@yahoo.com>\n---\ncommit 7e8fbf87acead0ee83afc4647228efdad0bbae2e\ntree 50acf8ce23fee4ca6c9493b5f5959093e7579c74\nparent d36ed1fd011d349ea2adc00456750b5b3da3a9cd\nauthor Mark Allen <mallen@aeris.local> 1117409841 -0500\ncommitter Mark Allen <mallen@aeris.local> 1117409841 -0500\n\n cg-log    |   15 +++++++--------\n cg-status |    2 +-\n 2 files changed, 8 insertions(+), 9 deletions(-)\n\nIndex: cg-log\n===================================================================\n--- 3a65f5fb53367c75f4f76aebed27a83d8679f068/cg-log  (mode:100755)\n+++ 50acf8ce23fee4ca6c9493b5f5959093e7579c74/cg-log  (mode:100755)\n@@ -148,10 +148,10 @@\n                                fi\n \n                                date=(${rest#*> })\n-                               pdate=\"$(showdate $date)\"\n+                               pdate=\"$(date -u -r $date)\"\n                                if [ \"$pdate\" ]; then\n-                                       echo -n $color$key $rest | sed \"s/>.*/> $pdate/\"\n-                                       echo $coldefault\n+                                       echo -n $color$key $rest | sed \"s/>.*/> $pdate/\" \n+                                       echo -n $coldefault\n                                else\n                                        echo $color$key $rest $coldefault\n                                fi\n@@ -168,11 +168,10 @@\n                                if [ -n \"$list_files\" ]; then\n                                        list_commit_files \"$tree1\" \"$tree2\"\n                                fi\n-                               echo; sed -re '\n-                                       /\n*Signed-off-by:.*/Is//'$colsignoff'&'$coldefault'/\n-                                       / *Acked-by:.*/Is//'$colsignoff'&'$coldefault'/\n-                                       s/./    &/\n-                               '\n+                               echo; sed -e \"/ *Signed-off-by:.*/s/\n*Signed-off-by:.*/$colsignoff&$coldefault/\" \n+                               -e\"/ *Acked-by:.*/s/\n*Acked-by:.*/$colsignoff&$coldefault/\" \n+                               -e \"s/./    &/\"\n+\n                                ;;\n                        *)\n                                echo $colheader$key $rest $coldefault\nIndex: cg-status\n===================================================================\n--- 3a65f5fb53367c75f4f76aebed27a83d8679f068/cg-status  (mode:100755)\n+++ 50acf8ce23fee4ca6c9493b5f5959093e7579c74/cg-status  (mode:100755)\n@@ -15,7 +15,7 @@\n \n {\n        git-ls-files -z -t --others --deleted --unmerged $EXCLUDE\n-} | sort -z -k 2 | xargs -0 sh -c '\n+} | sort -t '\\0' -k 2 | xargs -0 sh -c '\n while [ \"$1\" ]; do\n        tag=${1% *};\n        filename=${1#* };\n"},{"id":"4214","messageId":"20050529234911.GZ1036@pasky.ji.cz","threadId":"763","inReplyTo":"20050529234326.12407.qmail@web41203.mail.yahoo.com","subject":"Re: [COGITO PATCH] Fix cg-log and cg-status for non-GNU sed/sort","fromName":"Petr Baudis","fromEmail":"pasky@ucw.cz","sentAt":"2005-05-29T23:49:11Z","receivedAt":"2005-05-29T23:49:11Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Mon, May 30, 2005 at 01:43:26AM CEST, I got a letter\nwhere Mark Allen <mrallen1@yahoo.com> told me that...\n> --- Petr Baudis <pasky@ucw.cz> wrote:\n> > Dear diary, on Mon, May 30, 2005 at 01:00:10AM CEST, I got a letter\n> > where Mark Allen <mrallen1@yahoo.com> told me that...\n> > > -                               pdate=\"$(showdate $date)\"\n> > > +                               pdate=\"$(date -u -r $date)\"\n> > \n> > Hmm, coudlnt' showdate be fixed instead then? And $date is not a file so\n> > -r $date makes no sense to me - what am I missing?\n> \n> There is no showdate(1) command on Darwin.  On Darwin, the date(1) command flags are\n\nThere's probably no showdate command at all. This is internal function\ndefined in cg-Xlib. ;-)\n\n> -u (show UTC)\n> -r seconds \n> \n> So `date -u -r $date` gives output like \"Sun May 29 12:07:55 GMT 2005\" instead of\n> 1117336545\n\nGNU date:\n\n  -r, --reference=FILE      display the last modification time of FILE\n\n> > > -                               echo; sed -re '\n> > > -                                       /\n> > *Signed-off-by:.*/Is//'$colsignoff'&'$coldefault'/\n> > > -                                       /\n> > *Acked-by:.*/Is//'$colsignoff'&'$coldefault'/\n> > > -                                       s/./    &/\n> > > -                               '\n> > > +                               echo; sed -e \"/ *Signed-off-by:.*/s/\n> > *Signed-off-by:.*/$colsignoff&$coldefault/\" -e\"/\n> > > +*Acked-by:.*/s/ *Acked-by:.*/$colsignoff&$coldefault/\" -e \"s/./    &/\"\n> > > +\n> > \n> > Is it necessary to take away the newlines? What is the real problem,\n> > actually? Just the I flag?\n> \n> Is it strictly necessary to take away the newlines? I don't know. To be honest, I didn't \n> experiment too much with alternate implementations. But the I flag in the sed script, \n> yes that is not understood by non-GNU sed. And the \"-r\" to sed itself is also\n> problematic.\n\nI think we don't really need -r anyway. Could you please try with the\n'i' flag instead of 'I'? (The manpage is somewhat unclear on the\ndifference and portability.) Also, could you try if it works with the\nnewlines?\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nC++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor\n"},{"id":"4258","messageId":"20050530165655.GA1377@alc.bsd.st","threadId":"763","inReplyTo":"20050529234911.GZ1036@pasky.ji.cz","subject":"Re: [COGITO PATCH] Fix cg-log and cg-status for non-GNU sed/sort","fromName":"Alecs King","fromEmail":"alecsk@gmail.com","sentAt":"2005-05-30T17:00:38Z","receivedAt":"2005-05-30T17:00:38Z","isPatch":true,"sender":{"key":"alecsk@gmail.com","avatar":"https://avatars.githubusercontent.com/u/84553?v=4"},"body":"On Mon, May 30, 2005 at 01:49:11AM +0200, Petr Baudis wrote:\n> > > > -                               echo; sed -re '\n> > > > -                                       /\n> > > *Signed-off-by:.*/Is//'$colsignoff'&'$coldefault'/\n> > > > -                                       /\n> > > *Acked-by:.*/Is//'$colsignoff'&'$coldefault'/\n> > > > -                                       s/./    &/\n> > > > -                               '\n> > > > +                               echo; sed -e \"/\n> > > > *Signed-off-by:.*/s/\n> > > *Signed-off-by:.*/$colsignoff&$coldefault/\" -e\"/\n> > > > +*Acked-by:.*/s/ *Acked-by:.*/$colsignoff&$coldefault/\" -e \"s/./\n> > > > &/\"\n> > > > +\n> > > \n> > > Is it necessary to take away the newlines? What is the real\n> > > problem,\n> > > actually? Just the I flag?\n> > \n> > Is it strictly necessary to take away the newlines? I don't know. To\n> > be honest, I didn't \n> > experiment too much with alternate implementations. But the I flag\n> > in the sed script, \n> > yes that is not understood by non-GNU sed. And the \"-r\" to sed\n> > itself is also\n> > problematic.\n> \n> I think we don't really need -r anyway. Could you please try with the\n> 'i' flag instead of 'I'? (The manpage is somewhat unclear on the\n> difference and portability.) Also, could you try if it works with the\n> newlines?\n\n-r here is for the 'I' (same as 'i') modifier, which means case\ninsensitive.  non-GNU sed might not have the '-r' option or the 'I'\n('i') modifier.\n\nI dunno about the strict rules of 'Signed-off-by' things but what i have\nseen are all _exactly_ of this form.  I have never seen something like\n'SIGNED-OFF-BY' or 'sIGneD-oFf-bY'.\n\nIf only the exact case sensitive form is allowed, then we can safely\nremove the '-r' and 'I'.\n\nAlso, to Mark, as a quick alternative to work around these sed issues,\nyou can install the gsed port.  IIRC, opendarwin has this port.\n\nSpeaking of other portability issues, i made up a patch to make cogito\nproperly work under fbsd (without hurting others hopefully) weeks ago:\n\n1) expr would regard a negative $dtz as an option (-xx).\n2) coloring for both terminfo & termcap terminal.\n\nIndex: cg-Xlib\n===================================================================\n--- de641904363cd3759f132ee7c0dfaf8a2ee58388/cg-Xlib  (mode:100755)\n+++ 4e3c899dfa4a74effdb4ae23528785b8f688561d/cg-Xlib  (mode:100755)\n@@ -43,7 +43,7 @@\n \tdate=\"$1\"\n \tsec=${date[0]}; tz=${date[1]}\n \tdtz=${tz/+/}\n-\tlsec=$(expr $dtz / 100 \\* 3600 + $dtz % 100 \\* 60 + $sec)\n+\tlsec=$(expr \\( $dtz \\) / 100 \\* 3600 + \\( $dtz \\) % 100 \\* 60 +\n$sec)\n \tpdate=\"$(date -Rud \"1970-01-01 UTC + $lsec sec\" 2>/dev/null)\"\n \n \techo \"${pdate/+0000/$tz}\"\nIndex: cg-log\n===================================================================\n--- de641904363cd3759f132ee7c0dfaf8a2ee58388/cg-log  (mode:100755)\n+++ 4e3c899dfa4a74effdb4ae23528785b8f688561d/cg-log  (mode:100755)\n@@ -42,13 +42,14 @@\n \t# TODO: Parse -r here too.\n \tcase \"$1\" in\n \t-c)\n-\t\t# See terminfo(5), \"Color Handling\"\n-\t\tcolheader=\"$(tput setaf 2)\"    # Green\n-\t\tcolauthor=\"$(tput setaf 6)\"    # Cyan\n-\t\tcolcommitter=\"$(tput setaf 5)\" # Magenta\n-\t\tcolfiles=\"$(tput setaf 4)\"     # Blue\n-\t\tcolsignoff=\"$(tput setaf 3)\"   # Yellow\n-\t\tcoldefault=\"$(tput op)\"        # Restore default\n+\t\t# ANSI escape seq\n+\t\tesc=$(echo -e '\\e')\n+\t\tcolheader=\"${esc}[0;32m\"    # Green\n+\t\tcolauthor=\"${esc}[0;36m\"    # Cyan\n+\t\tcolcommitter=\"${esc}[0;35m\" # Magenta\n+\t\tcolfiles=\"${esc}[0;34m\"     # Blue\n+\t\tcolsignoff=\"${esc}[0;33m\"   # Yellow\n+\t\tcoldefault=\"${esc}[0m\"      # Restore default\n \t\tshift\n \t\t;;\n \t-f)\n\n-- \nAlecs King\n"},{"id":"4286","messageId":"20050531011925.94043.qmail@web41213.mail.yahoo.com","threadId":"763","inReplyTo":"20050529234911.GZ1036@pasky.ji.cz","subject":"Re: [COGITO PATCH] Fix cg-log and cg-status for non-GNU sed/sort","fromName":"Mark Allen","fromEmail":"mrallen1@yahoo.com","sentAt":"2005-05-31T01:19:25Z","receivedAt":"2005-05-31T01:19:25Z","isPatch":true,"sender":{"key":"mrallen1@yahoo.com","avatar":null},"body":"--- Petr Baudis <pasky@ucw.cz> wrote:\n> I think we don't really need -r anyway. Could you please try with the\n> 'i' flag instead of 'I'? (The manpage is somewhat unclear on the\n> difference and portability.) Also, could you try if it works with the\n> newlines?\n\nI tried with an i\\ which is what the sed on Darwin wants, and it didn't work very well...\nso, I just removed the I and i\\ and that worked pretty nicely. I shaved off the -r and\nmade for a simpler patch.\n\nI also added $has_gnudate to cg-Xlib and modified the logic in showdate to use the\nappropriate command depending on whether $has_gnudate is true or false.\n\nFinally, I stripped the -z from sort because it seems to do the right thing anyway\nwithout it and it makes the sort on Darwin unhappy.\n\nAnyway, here's another try, this against the tip of the most recent cogito tree.\n\n---\n\nModify cg-log, cg-Xlib and cg-status for non-GNU sed, sort and date.\n\nSigned-off-by: Mark Allen <mrallen1@yahoo.com>\n\ndiff --git a/cg-Xlib b/cg-Xlib\n--- a/cg-Xlib\n+++ b/cg-Xlib\n@@ -42,9 +42,13 @@ mktemp () {\n showdate () {\n        date=\"$1\"\n        sec=${date[0]}; tz=${date[1]}\n-       dtz=${tz/+/}\n-       lsec=$(expr $dtz / 100 \\* 3600 + $dtz % 100 \\* 60 + $sec)\n-       pdate=\"$(date -Rud \"1970-01-01 UTC + $lsec sec\" 2>/dev/null)\"\n+       if [ ! \"$has_gnudate\" ]; then \n+               pdate=\"$(date -u -r ${date[0]} 2>/dev/null)\"\n+       else\n+               dtz=${tz/+/}\n+               lsec=$(expr $dtz / 100 \\* 3600 + $dtz % 100 \\* 60 + $sec)\n+               pdate=\"$(date -Rud \"1970-01-01 UTC + $lsec sec\" 2>/dev/null)\"\n+       fi\n \n        echo \"${pdate/+0000/$tz}\"\n }\n@@ -137,3 +141,4 @@ fi\n \n export BROKEN_MKTEMP=1\n del=$($(which mktemp) -t 2>/dev/null) && { rm $del; export BROKEN_MKTEMP=; }\n+has_gnudate=$(date -Rud \"1970-01-01 UTC\" 2>/dev/null)\ndiff --git a/cg-log b/cg-log\n--- a/cg-log\n+++ b/cg-log\n@@ -190,8 +190,7 @@ $revls | $revsort | while read time comm\n                                date=(${rest#*> })\n                                pdate=\"$(showdate $date)\"\n                                if [ \"$pdate\" ]; then\n-                                       echo -n $color$key $rest | sed \"s/>.*/> \n$pdate/\"\n-                                       echo $coldefault\n+                                       echo -n $color$key $rest | sed \"s/>.*/> \n$pdate$coldefault/\"\n                                else\n                                        echo $color$key $rest $coldefault\n                                fi\n@@ -208,9 +207,9 @@ $revls | $revsort | while read time comm\n                                if [ -n \"$list_files\" ]; then\n                                        list_commit_files \"$tree1\" \"$tree2\"\n                                fi\n-                               echo; sed -re '\n-                                       / *Signed-off-by:.*/Is//'$colsignoff'&'$\ncoldefault'/\n-                                       / *Acked-by:.*/Is//'$colsignoff'&'$colde\nfault'/\n+                               echo; sed -e '\n+                                       / *Signed-off-by:.*/s//'$colsignoff'&'$c\noldefault'/\n+                                       / *Acked-by:.*/s//'$colsignoff'&'$coldef\nault'/\n                                        s/./    &/\n                                '\n                                ;;\ndiff --git a/cg-status b/cg-status\n--- a/cg-status\n+++ b/cg-status\n@@ -41,7 +41,7 @@ fi\n \n {\n        git-ls-files -z -t --others --deleted --unmerged $EXCLUDE\n-} | sort -z -k 2 | xargs -0 sh -c '\n+} | sort -k 2 | xargs -0 sh -c '\n while [ \"$1\" ]; do\n        tag=${1% *};\n        filename=${1#* };\n"}]}