[Toybox] grep -A/B/C doesn't respect -n

Rob Landley rob at landley.net
Thu Feb 4 15:52:28 PST 2016


On 02/02/2016 08:53 PM, enh wrote:
> i had a quick play with the new -A/B/C and noticed that toybox doesn't
> respect -n for the context lines. should look something like:
> 
> ~$ grep -n -C1 CPU /proc/cpuinfo
> 4-model : 69
> 5:model name : Intel(R) Core(TM) i7-4600U CPU @ 2.10GHz
> 6-stepping : 1
> ...
> 
> but actually looks like this:
> 
> $ ./toybox grep -n -C1 CPU /proc/cpuinfo
> 5:model : 69
> model name : Intel(R) Core(TM) i7-4600U CPU @ 2.10GHz
> stepping : 1
> 
> (note also that for the line that _does_ get the -n prefix, there
> should be a - rather than a : on non-matching context lines.)

Sigh. I fixed one issue on this machine, pushed it, fixed the other on
the other machine, accidentlly committed and pulled, and it added a
merge commit I didn't notice until after I pushed.

I need a way to tell git "if you can't do a fast forward, FAIL". If get
reset HEAD^1 doesn't fix it I will #*%(&# clone a fresh repo and get
format-patch and git am the patches over until I have a clean history.

Blah.

Anyway, should be fixed in the repo now. Right after a giant pointless
wart of a merge commit that merged branches that DIDN'T TOUCH THE SAME
#*(%&# FILES EVEN ONCE.

I hate git,

Rob

 1454629948.0


More information about the Toybox mailing list