linux - Error adding a Patch with a diff file -


i have trouble adding patch using diff file. created diff file using 2 c sources in way:

$diff gitrans.c.origin gifstrans > giftrans.diff 

when try create patch using diff file obtain error:

$patch -p1 < giftrans.diff patch: **** garbage found in patch input. 

could me please? can't find solution.

you should use unified diff format given patch syntax

$diff -u gitrans.c.origin gifstrans > giftrans.diff $patch < giftrans.diff 

or default diff format following patch syntax

$diff gitrans.c.origin gifstrans > giftrans.diff $patch gitrans.c.origin giftrans.diff 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -