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)
Fri, Nov 1, 5:44 PM
Unknown Object (File)
Sat, Oct 26, 11:54 PM
Unknown Object (File)
Fri, Oct 18, 11:46 PM
Unknown Object (File)
Fri, Oct 18, 11:46 PM
Unknown Object (File)
Oct 4 2024, 11:47 PM
Unknown Object (File)
Oct 2 2024, 3:41 AM
Unknown Object (File)
Oct 1 2024, 10:42 PM
Unknown Object (File)
Sep 29 2024, 7:25 AM
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 Skipped
Unit
Tests Skipped
Build Status
Buildable 51386
Build 48277: arc lint + arc unit

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