John Admanski [2010-09-13, 17:43 +0200]: > On Mon, Sep 13, 2010 at 8:26 AM, Frank Becker <[email protected]> wrote: > > > John Admanski [2010-09-13, 16:44 +0200]:
Hi,
[...]
> > > > + branch = [b.lstrip('* ') for b in
> > gitlog.stdout.split('\n') \
> > > > + if b.startswith('*')][0]
> > > > + return branch
> > That's the line we talk about. I'd like to strip off the two 1st characters
> > '* '. b[2:] would be equivalent.
> Yeah, if the idea is to find the branch by looking for a line that starts
> with '* ' then it's probably better to write it as:
>
> branch = [b[2:] for b in gitlog.stdout.split('\n') if b.startswith('* ')][0]
Right, that is the better solution. I'll send a patch to fix that tomorrow.
Don't have access to the repo right now.
BTW, git doesn't allow a branch name or tag starting with a '*'.
Bye,
Frank
--
Frank Becker <[email protected]> (jabber|mail) | http://twitter.com/41i3n8
GnuPG: 0xADC29ECD | F01B 5E9C 1D09 981B 5B40 50D3 C80F 7459 ADC2 9ECD
SILC-Net: a8 | Home: http://www.alien8.de | <<</>> http://www.c3d2.de
"> Freedom is just chaos, with better lighting. <" Alan Dean Foster
signature.asc
Description: Digital signature
_______________________________________________ Autotest mailing list [email protected] http://test.kernel.org/cgi-bin/mailman/listinfo/autotest
