Re: cg-log patches
Petr Baudis <pasky@ucw.cz> wrote Mon, May 09, 2005:
Show 20 quoted lines
> Dear diary, on Mon, May 09, 2005 at 01:39:07PM CEST, I got a letter
> where Jonas Fonseca <fonseca@diku.dk> told me that...
> > Fix cg-log -f option so that a complete list of files is
> > displayed when a commit has more than one parent.
> >
> > Signed-off-by: Sean Estabrooks <seanlkml@sympatico.ca>
> > Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
>
> But that makes no sense, since each merge will have enormous amount of
> files listed, making no sense. E.g. each merge of Cogito with Linus will
> have all the Cogito files listed, since they aren't in the Linus branch
> - but that's wrong, since the merge _to_ the Cogito branch concerns no
> Cogito files.
>
> In git, the parents list is unordered. But this is different in Cogito,
> where the first parent _is_ special. If you are merging _from_ branch B
> _to_ branch A, the order of parents will be always
>
> parent A
> parent B
Ok, forget the patch then. I was not sure how to handle the multiple parents.
Show 9 quoted lines
> > Index: cg-log
> > ===================================================================
> > --- 95bc73fd188347aa294991d1c5c7cffd60422098/cg-log (mode:100755)
> > +++ ddf82a0140bdc1440eb93bcbe01e14e90e44a3e8/cg-log (mode:100755)
> > @@ -67,8 +67,16 @@
> > done
> > fi | sort -u | \
> > while read modes type sha1s file; do
> > - echo -n "$sep$file"
# Always put a trailing comma
Show 15 quoted lines
> > + 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:"
> > }
>
> Could we have a trailing comma at the previous line?
It should already do that ..
committer Petr Baudis <xpasky@machine.sinus.cz> Sun, 08 May 2005 23:54:08 +0200
* cg-Xlib, cg-update, cg-seek, cg-pull, cg-tag-ls, cg-branch-ls, cg-merge,
cg-commit, cg-tag, cg-init, cg-branch-add, cg-admin-lsobj, cg-status,
cg-cancel, cg-admin-uncommit:--
Jonas Fonseca