Re: [PATCH] blame: add a range option to -L

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

 



> > In addition to + and - you can now use r to specify how many lines
> > around <start> that you want to see.  For example: -L 20,r5 would show
> > lines 15 through 25
> 
> >From too much exposure to subversion, the r suggests â??revisionâ??.
> But ± is too hard to type, so I guess r will have to do.
> 

I wasn't too thrilled with using r either, but I couldn't think of
anything better.


> > +		/* if top is negative then top is actually a range
> > +		   that was specified with the r option */
> > +		if (*top < 1) {
> > +		    long x = *top;
> > +		    *top = *bottom - x;
> > +		    *bottom += x;
> > +		    if (*bottom < 1)
> > +			*bottom = 1;
> > +		}
> 
> How does this treat -L 5,-10?
> 

Yes, you're correct, my code will mess that up.  I thought I had
verified that parse_loc() would never return a number less than 1 as
*top, but looking again I see I didn't do that.  So my patch is no
good.  Sorry folks.

-- 
Bill Pemberton                                 wfp5p@xxxxxxxxxxxx
ITC/Unix Systems                               flash@xxxxxxxxxxxx
University of Virginia

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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]