Here're a couple of pretty simple patches against cg-log and cg-status (two cogito commands I use a lot) for the non-GNU (or at least older, forked GNU) tools on Darwin.
There's also a non-GNU sed problem in cg-commit, but I haven't quite figured a good way to tackle this issue yet. (The problem is in the regex stripping leading and trailing newlines from $LOGMSG at line 170. Darwin's sed does not like the embedded curly braces, but there's not a good simple way to rewrite this and retain the meaning of the "sedlet" that tracks whether its seen any text yet.)
Cheers,
--Mark
--- commit e43fc64b1f779b1ecf1bcc36e4f89a9f43ab2fb6 tree 95770616edbd49c71dff9ca6e51e7abf449d35e7 parent d36ed1fd011d349ea2adc00456750b5b3da3a9cd author Mark Allen <mrallen1@yahoo.com> 1117406652 -0500 committer Mark Allen <mallen@aeris.local> 1117406652 -0500
cg-log | 13 +++++-------- cg-status | 2 +- 2 files changed, 6 insertions(+), 9 deletions(-)
Show changes to diff +6 −9
Index: cg-log =================================================================== --- 3a65f5fb53367c75f4f76aebed27a83d8679f068/cg-log (mode:100755) +++ 95770616edbd49c71dff9ca6e51e7abf449d35e7/cg-log (mode:100755) @@ -148,10 +148,10 @@ fi date=(${rest#*> }) - pdate="$(showdate $date)" + pdate="$(date -u -r $date)" if [ "$pdate" ]; then - echo -n $color$key $rest | sed "s/>.*/> $pdate/" - echo $coldefault + echo -n $color$key $rest | sed "s/>.*/> $pdate/" + echo -n $coldefault else echo $color$key $rest $coldefault fi @@ -168,11 +168,8 @@ if [ -n "$list_files" ]; then list_commit_files "$tree1" "$tree2" fi - echo; sed -re ' - / *Signed-off-by:.*/Is//'$colsignoff'&'$coldefault'/ - / *Acked-by:.*/Is//'$colsignoff'&'$coldefault'/ - s/./ &/ - ' + echo; sed -e "/ *Signed-off-by:.*/s/ *Signed-off-by:.*/$colsignoff&$coldefault/" -e"/ *Acked-by:.*/s/ *Acked-by:.*/$colsignoff&$coldefault/" -e "s/./ &/" + ;; *) echo $colheader$key $rest $coldefault Index: cg-status =================================================================== --- 3a65f5fb53367c75f4f76aebed27a83d8679f068/cg-status (mode:100755) +++ 95770616edbd49c71dff9ca6e51e7abf449d35e7/cg-status (mode:100755) @@ -15,7 +15,7 @@ { git-ls-files -z -t --others --deleted --unmerged $EXCLUDE -} | sort -z -k 2 | xargs -0 sh -c ' +} | sort -t '\0' -k 2 | xargs -0 sh -c ' while [ "$1" ]; do tag=${1% *}; filename=${1#* };