over 4 years ago

git show --binary でバイナリ込みのパッチが作れます。

バイナリ無し

$ git show e7df8674fac89556864e1ccc216e31393a90d059
commit e7df8674fac89556864e1ccc216e31393a90d059
Author: ynomoto <ynomoto@github>
Date:   Wed Mar 27 00:37:42 2013 +0900

    modify image

diff --git a/original.jpg b/original.jpg
index 240083f..58df6e3 100644
Binary files a/original.jpg and b/original.jpg differ

バイナリ込み

$ git show --binary e7df8674fac89556864e1ccc216e31393a90d059
commit e7df8674fac89556864e1ccc216e31393a90d059
Author: ynomoto <ynomoto@github>
Date:   Wed Mar 27 00:37:42 2013 +0900

    modify image

diff --git a/original.jpg b/original.jpg
index 240083f95777d3e7eaf677149abcd1fe5312ddb5..58df6e31ef01a9b8a133409a203227e8
GIT binary patch
literal 59829
zcmeFZcUV*1wl5r{3PJ<~lok{a6%YX_A|xu(M2vzO0U;<=ktWh10i?GGC<rP+sz{0S
zPUs+2Kzc9IOF|8#aF_4CXP<rUeb4#MIrqN%kMFrF&rBA{T#GrzoMVjND03YS9ZrFc
z-_q341kurfKy<(hbT|!quHpX73Ix*A16=@tKrEmmbh4l$z?m@6&IUgNF#w-HPtZ-E
zfv#IPJhc?LYvb_B!P&;aQAFK9K}7F~`7`_9e}h0rl8^jLe|q0!`hPwDeeK~WNF8+K
z_d)l^`;jB`^h^x&z`@MO$iT$H%);`!9c5)_J9_jOD+>!7nC%!l2XGu^JI)E_;QW35
z`zF6H2d-jbU|`}n%5wB~kN?_nSPSB0q4xz|bZ0<EIO*s)=?)t~5P(ibx<8KJ!~K2G
z9ieAnWMT%!#0GRIJ`OO4p8f~}JuqH?Ep$G>?;r+FMy}Jc*O|EQJz+lMbVANA`ZJ5@
zjr=+u{T_mt{L`2IM_GCKPM+cyKPz$W{DsR3ib~2?RMc;3XliNe+%mZT;349Xp^>?T
zrIoeKv**sQTwLAUJv?6r1O^3%goee$zI_)L|2`oxB{eNQBlAnv*Mh>L;*!#`@{0O~
z#-`?$*6(e-eLwpL28V`6re|j7e$6i|E-e!`x3+h7_elE(zv-d_(f^Gs;QdeO;soeA
z!oWb!!2Fvox+8AC3Fl;BJT1$_b^RXm6DRI7a(*l)ZbX01uRAI#uTS84`m%?WSM2h%
zIPo`We^B<HBh3H5McLm8`&YU~K*#9mfXSoh1i?U5N=n!{(En@yj|cz%S_AugyXmAR
zzFIg*;t<p%6P7+>qNUM;B%ijpTemTPhD}2x`rX#Aa5wUmWDd7xbP0Afa|*)sTtz7i
(省略)
ysk$ 
← リフレクションを使う Apache Commons Imaging →