Re: [PATCH 1/2] repack: respect kept objects with '--write-midx -b'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 20, 2021 at 08:40:09AM -0500, Derrick Stolee wrote:

> > One could perhaps argue that the combined grep is less readable. If
> > that's a concern, I'd suggest wrapping it in a function like:
> > 
> >   # usage: check_trace2_arg <trace_file> <cmd> <arg>
> >   check_trace2_arg () {
> > 	grep "\"event\":\"start\".*\"$2\".*\"$3\"" "$1"
> >   }
> > 
> > All just suggestions, of course. I'd be happy enough to see the patch go
> > in as-is.
> 
> Thanks for the suggestions. I decided to adapt the 'test_subcommand'
> helper into a 'test_subcommand_inexact' helper. The existing helper
> requires the full argument list in exact order, but the new one only
> cares about the given arguments (in that relative order).

Heh, I should have looked to see if we had faced this problem before.
Extending that family of helpers is better still than my suggestion.

-Peff



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux