I have a question for the git gurus here.

I just ran into difficulty with git apply (as wrapped by git am)
because the patch file was created before a styling change that
changed whitespace not only for the context lines but also the
single line (in this case) that was replaced by several lines.

"git help apply" says the following:

  --ignore-space-change, --ignore-whitespace
    When applying a patch, ignore changes in whitespace in context lines if 
necessary.

As documented this does work for style changes for the context lines, but not 
the
replacement line(s).

Is there some other option (perhaps not yet documented in git help)
which is the equivalent of --ignore-all-space, i.e., ignore whitespace
changes in replaced lines as well?

I also tried patch --ignore-whitespace --dry-run to see if that would
work, but it did not since from that documentation a run of whitespace
is treated effectively as a single blank, and in some cases styling
adds blanks where there were none before.

In the present case, I worked around the issue by editing the single
replaced line to match the new styling, but that method is cumbersome
if there are a lot of replaced lines, and a git apply option to simply
--ignore-all-whitespace in both context and replaced lines would be
much better.  Is such an option out there for git apply?

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
__________________________

------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to