On Wed, Mar 5, 2014 at 2:53 PM, Chris Larson <[email protected]> wrote: > > On Wed, Mar 5, 2014 at 10:47 AM, Richard Purdie > <[email protected]> wrote: >> >> On Wed, 2014-03-05 at 16:49 +0000, Matt Fleming wrote: >> > From: Matt Fleming <[email protected]> >> > >> > 'git branch' may use ANSI escape codes in its output (to provide colour) >> > which doesn't play well with commands expecting pure plain text, e.g. >> > >> > fatal: '^[[31mmaster^[[m' is not a valid branch name. >> > >> > Furthermore, the output of 'git branch' is subject to change and trying >> > to parse it could potentially lead to breakage in the future. >> > >> > Signed-off-by: Matt Fleming <[email protected]> >> > --- >> > meta/classes/kernel-yocto.bbclass | 10 +++++----- >> > 1 file changed, 5 insertions(+), 5 deletions(-) >> >> My worry with this change is that it will cause the system to hit the >> network. We specifically support builds from archives of the >> repositories so I'd worry about using ls-remote like this :/. > > > What about git for-each-ref? If we just need a list of refs, that's what > for-each-ref is ideal for.
Good suggestion, that can definitely work. With the format, it saves the awkward awking and cutting : I've used this in the past: git for-each-ref --shell --format="%(refname)" refs/heads/ refs/remotes The minimum footprint change is still just --no-color, that way we don't change just for the sake of changing. Cheers, Bruce > -- > Christopher Larson > clarson at kergoth dot com > Founder - BitBake, OpenEmbedded, OpenZaurus > Maintainer - Tslib > Senior Software Engineer, Mentor Graphics > > _______________________________________________ > Openembedded-core mailing list > [email protected] > http://lists.openembedded.org/mailman/listinfo/openembedded-core > -- "Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end" _______________________________________________ Openembedded-core mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-core
