Bug 173691 - pretty patch doesn't show image diffs with newer versions of git
Summary: pretty patch doesn't show image diffs with newer versions of git
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Carlos Alberto Lopez Perez
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-21 20:17 PDT by Carlos Alberto Lopez Perez
Modified: 2017-06-22 12:38 PDT (History)
8 users (show)

See Also:


Attachments
Patch (2.00 KB, patch)
2017-06-21 20:25 PDT, Carlos Alberto Lopez Perez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Alberto Lopez Perez 2017-06-21 20:17:06 PDT
Tools/Scripts/webkit-patch pretty-diff or Tools/Scripts/show-pretty-diff doesn't generate images anymore with newer versions of git. Instead of the image an error appears saying:

Error running git apply --directory=/tmp
with patch:
diff --git a/PrettyPatch20170622-32032-41lcvr.bin b/PrettyPatch20170622-32032-41lcvr.bin
new file mode 100644
index 0000000000000000000000000000000000000000..e03210de3ed0f0bfe3ca9a4fe73386d7ed93fb73
GIT binary patch
literal 3278
zcmeAS@N?(olHy`uVBq!ia0y~yU{+vYV2a>i0*Z)=h^hlA%@Ws$lH`ok<m}?oTn5WT
zBLhn_Ln9Ll!?eWYM58nV6B9Ed^Q1H*1H)8{By)$IF1LZ2*pj^6T^Rm@;DWu&Co?ec
z_<6cGhE&XXd-q`O?Fa_fiw_-mmnd!IxNeZ^vQqhMz}Y3e_OB%t9+ZrK>HWzvTIxu2
zT+O6wM#p||Gc@r3{qgbf5BdMKyJZ;|;wK+qV(8%1VQ83v!MKt6{?I0!?{^p(K5$H`
z7kt...
error: invalid path '/tmp/PrettyPatch20170622-32032-41lcvr.bin'


This "error: invalid path" is caused because git >= 2.3.3 added an extra security check enabled by default that forbids git apply to work on files outside of the working area.

To return back to the previous behaviour the argument --unsafe-paths can be passed.
Comment 1 Carlos Alberto Lopez Perez 2017-06-21 20:25:24 PDT
Created attachment 313580 [details]
Patch
Comment 2 WebKit Commit Bot 2017-06-22 12:38:42 PDT
Comment on attachment 313580 [details]
Patch

Clearing flags on attachment: 313580

Committed r218711: <http://trac.webkit.org/changeset/218711>
Comment 3 WebKit Commit Bot 2017-06-22 12:38:44 PDT
All reviewed patches have been landed.  Closing bug.