Page MenuHomeFreeBSD

git-arc: Just strip escape sequences form arc log
ClosedPublic

Authored by imp on Sep 13 2022, 8:46 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 21, 9:38 AM
Unknown Object (File)
Sat, Apr 20, 4:52 PM
Unknown Object (File)
Fri, Apr 19, 1:47 PM
Unknown Object (File)
Fri, Apr 19, 5:41 AM
Unknown Object (File)
Fri, Apr 19, 4:57 AM
Unknown Object (File)
Fri, Apr 19, 4:57 AM
Unknown Object (File)
Fri, Apr 19, 4:57 AM
Unknown Object (File)
Mon, Apr 15, 1:10 PM
Subscribers
None

Details

Summary

Just strip escape sequences and Warning: lines from 'arc list' output. I
upgraded and they changed and git arc list broke. This restores its
functionality.

Sponsored by: Netflix

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

imp requested review of this revision.Sep 13 2022, 8:46 PM
imp created this revision.

Yea, let's acutally do post the code that worked rather than the crazy
experiment that's best forgotten.

I'm fine with the change in principle, but could you please lift "arc list" invocations into a subroutine which does the filtering and includes a comment explaining why we do it? Something like

arc_list()
{
    arc list | sed ...
}
tools/tools/git/git-arc.sh
417

Above you exclude "^Warning: module" but here it's just ^Warning.

tools/tools/git/git-arc.sh
417

Yea, that's bogus. Fixed in respin

markj added inline comments.
tools/tools/git/git-arc.sh
147

Not really "stray" they're just a result of colourized output, which seems impossible to turn off. :(

This revision is now accepted and ready to land.May 7 2023, 5:43 PM
tools/tools/git/git-arc.sh
147

I'll reword Tobe sparky towards the lack of a --no-color option...

Hmm, does this mean 'git arc list' no longer lists the colorized output it did before?

In D36553#910901, @jhb wrote:

Hmm, does this mean 'git arc list' no longer lists the colorized output it did before?

Yes. That's a side effect

use "$@" instead of $*. This is better (see sh(1))

This revision now requires review to proceed.May 8 2023, 11:32 PM
In D36553#910939, @imp wrote:
In D36553#910901, @jhb wrote:

Hmm, does this mean 'git arc list' no longer lists the colorized output it did before?

Yes. That's a side effect

That's fine with me, but John or others might consider that a regression?

This revision is now accepted and ready to land.May 9 2023, 2:15 PM

I must admit I am quite used to the color output and depend on it to stand out accepted from needs review, etc in the list output. I kept the colors intentionally in the original version of list.

In D36553#911581, @jhb wrote:

I must admit I am quite used to the color output and depend on it to stand out accepted from needs review, etc in the list output. I kept the colors intentionally in the original version of list.

I can omit this part of the series and we can chat at bsdcan... I like the color, but haven't missed it and it appears the issues I had with it have been worked around in other ways in the interim