git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* git: patch does not apply
@ 2011-01-26 12:41 Dmitri Pissarenko
  2011-01-26 17:43 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Dmitri Pissarenko @ 2011-01-26 12:41 UTC (permalink / raw)
  To: git

Hello!

I have a certain patch called my_pcc_branch.patch.

When I try to apply it, I get following message:

$ git apply --check my_pcc_branch.patch
warning: src/main/java/.../AbstractedPanel.java has type 100644, expected 100755
error: patch failed: src/main/java/.../AbstractedPanel.java:13
error: src/main/java/.../AbstractedPanel.java: patch does not apply

What does it mean?

How can I fix this problem?

Notes:

1) I posted this question on StackOverflow and tried out several
things suggested there.

http://stackoverflow.com/questions/4770177/git-patch-does-not-apply

However, I don't have a working solution yet.

2) I'm using git 1.7.3.1.mysgit.0 under Windows 7. The author of the
patch uses Windows XP.

Thanks in advance

Dmitri

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: git: patch does not apply
  2011-01-26 12:41 git: patch does not apply Dmitri Pissarenko
@ 2011-01-26 17:43 ` Junio C Hamano
  0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2011-01-26 17:43 UTC (permalink / raw)
  To: Dmitri Pissarenko; +Cc: git

Dmitri Pissarenko <dmitri.pissarenko@gmail.com> writes:

> When I try to apply it, I get following message:
>
> $ git apply --check my_pcc_branch.patch
> warning: src/main/java/.../AbstractedPanel.java has type 100644, expected 100755

Whoever prepared the patch started off of the version of the file with
executable bit dropped, while you still have a version with executable
bit.  This is a warning and is not a cause for the patch not applying.

> error: patch failed: src/main/java/.../AbstractedPanel.java:13
> error: src/main/java/.../AbstractedPanel.java: patch does not apply

The tool looked at around line 13 of the APanel.java file because the
input, my_pcc_branch.patch, wanted to change things around there, but
couldn't find corresponding preimage.

> What does it mean?

That is what it means.

> How can I fix this problem?

Look at the patch (find lines that perhaps begin with "@@ -13,something"
after "diff --git a/...APanel.java b/...APanel.java" appears), look at the
APanel.java file at around line 13, and see how they differ.  Discern what
the patch wanted to do, and make a corresponding edit to ...APanel.java
file.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-01-26 17:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-26 12:41 git: patch does not apply Dmitri Pissarenko
2011-01-26 17:43 ` Junio C Hamano

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).