Re: cg-log patches
- From
Jonas Fonseca <fonseca@diku.dk>
- Date
- May 8, 2005, 23:49 UTC
- Message-ID
- <20050508234936.GA26624@diku.dk>
- In-Reply-To
- <1742.10.10.10.24.1115573750.squirrel@linux1>
Sean <seanlkml@sympatico.ca> wrote Sun, May 08, 2005:
> commit 33762f33ee87377c0cfcea51382bad04d7c9ba8d > > Fix cg-log -f option so that a complete list of files is > displayed when a commit has more than one parent.
This sounds great.
> Move the list of files so they're displayed after the > commit message
The reason I put it at the top was to make it more similar to GNU-style changelogs (if there is such a style).
> List the files in columns, instead of one big line of comma- > separated files.
I think that will make `-f' less usable because of the extra scrolling.
Assuming use of wc will not create more dependency nightmares and the extra overhead is acceptable here is a patch that will wrap file listing lines near the 80th column.
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
--- d4119364a7fbf5a4b8f00f061e4f5d58fa4abd0e/cg-log (mode:100755) +++ uncommitted/cg-log (mode:100755)
@@ -64,8 +64,16 @@ fi echo $list_cmd | while read modes type sha1s file; do - echo -n "$sep$file" + echo -n "$sep" sep=", " + if [ $(echo "$line$sep$file" | wc -c) -lt 75 ]; then + line="$line$sep$file" + echo -n "$file" + else + line="$file" + echo "$coldefault" + echo -n " $colfiles$file" + fi done echo "$coldefault:" }
-- Jonas Fonseca