On 2014-10-23 10:23-0700 David MacMahon wrote:

> Hi, Alan,
>
> On Oct 22, 2014, at 6:17 PM, Alan W. Irwin wrote:
>
>> Today I wanted to discover the author, commit id, and the date for a
>> commit that created a particular line in a file (the restore_cmap1()
>> line in examples/python/xw08.py which has no C counterpart).  After a bit of
>> searching I discovered the "git blame" command which did exactly what I
>> wanted.
>
> It sounds like "git blame" was the perfect tool for this job.  Another 
> similar tool is "git log -S".
>
> $ git log -Srestore_cmap1 --oneline examples/python/xw08.py
> d7db05b Revert to using fixed examples and instead have a "include" file 
> which adds the correct import statements for Numeric / numpy. This also 
> allows the file to define functions missing from Numeric, e.g. isnan.
> 32686ad Port python bindings to use numpy instead of Numeric. Currently numpy 
> support is disabled. To enable it use -DHAVE_NUMPY=ON on the cmake command 
> line.
> 8bb973d Add routine to restore cmap1 to default (so that subsequent examples 
> that use cmap1 such as xw16 still continue to have default cmap1).
>
> There's also "git log -G" which takes a regular expression.  See "git help 
> log" for more details.  For a single file, "git blame" is generally 
> preferable (though it can be slower), but for multiple files/directories "git 
> log -S" is great.

Thanks for that info concerning additional git features.

>
>> I was concerned that might create a different PostScript file
>> result for Python, but since restore_cmap1 call has been there since
>> 2002 with no issues like that, I have to look elsewhere for the source
>> of the recently introduced one-line diff I am getting between the
>> plsurf3dl Python and C results for example 8.
>
> There's always "git bisect"... :-)

Yeah, I used that command often with the git version of Wine to figure
out when Wine regressions were introduced.  Definitely a killer app
for finding regressions.

In this case, my above categorization of the problem I
discovered with plsurf3dl was incorrect, and I now think the
issue is likely a misdesign of the ps device driver from the first
so git bisect is not going to help, and actual debugging is required
instead.  More later on that with appropriate subject line.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

------------------------------------------------------------------------------
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to