After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 719531 - Gitg generated patch fails to apply
Gitg generated patch fails to apply
Status: RESOLVED FIXED
Product: gitg
Classification: Applications
Component: gitg
git master
Other Linux
: Normal normal
: ---
Assigned To: gitg-maint
gitg-maint
Depends on:
Blocks:
 
 
Reported: 2013-11-29 07:37 UTC by Sindhu S
Modified: 2015-08-08 09:33 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sindhu S 2013-11-29 07:37:43 UTC
I generated a patch which had a new image file new it along with some text changes to an existing file. Applying this patch again gave me:

sindhu@arch ~/code/gnome/zenity/help/C (git)-[master] % git am ~/tmp/patches/Add-user-help-for---listen-bug-711396.patch   
Applying: Add user help for --listen, bug 711396
error: cannot apply binary patch to 'help/C/figures/zenity-notification-listen-screenshot.png' without full index line
error: help/C/figures/zenity-notification-listen-screenshot.png: patch does not apply
Patch failed at 0001 Add user help for --listen, bug 711396
The copy of the patch that failed is found in:
   /home/sindhu/code/gnome/zenity/.git/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

The line of interest here is: 

error: cannot apply binary patch to 'help/C/figures/zenity-notification-listen-screenshot.png' without full index line

I generated patch for same commit with `git am` and compared contents of both these patches (git am- generated and gitg-generated) and found that `git am` patch had the binary changes in full whereas gitg-generated patch did not.

`git am` generated patch had http://fpaste.org/57629/13857106/
gitg generated patch had http://fpaste.org/57630/71065513/
Comment 1 jessevdk@gmail.com 2013-12-23 16:07:57 UTC
For now, we should detect if a patch contains binary and alert the user that we don't support this yet. Afaik, libgit2 doesn't currently generate binary patches, so if we would want support for this, we would need to implement something ourselves.
Comment 2 jessevdk@gmail.com 2015-08-08 09:33:20 UTC
This problem has been fixed in the unstable development version. The fix will be available in the next major software release. You may need to upgrade your Linux distribution to obtain that newer version.