Git -p4 submit fail with patch not applicable

When I do the following:

$ git-p4 submit 

I am completing the following error tracing:

 error: patch failed: foo/bar/blah.h:1 error: foo/bar/blah.h: patch does not apply Unfortunately applying the change failed! What do you want to do? [s]kip this patch / [a]pply the patch forcibly and with .rej files / [w]rite the patch to a file (patch.txt) 

How can I recover from this situation and make a successful presentation?

FWIW, our P4 server is configured to use the keyword extension (filetype = text + k), and line 3 of the problem file has an extended keyword. I made changes to line 1.

I tried to delete the delta in line 1, but the error persists when I repeat submit git -p4 submit.

+7
source share
2 answers

I found out right after the publication of this question.

The trick followed P4 back and sifted out the keyword expansion.

 chmod +w foo/bar/blah.h edit foo/bar/blah.h #change $File: //depot/foo/bar/blah.h$ to $File$ chmod -w foo/bar/blah.h git-p4 submit 

It worked.

+6
source

That will kill me too. Another option is to change the file type using the GUI tool or command line so that it is no longer the type text+k or text+ko (so that the extension does not occur). If you do this, it will commit OK.

+1
source

All Articles