First, since I'm a newbie at git, I'll have to post more background then may be necessary. (I've edited this to remove all the path/file_names and search_for patterns)
# git apply -v patch_name.patch
[...] trailing whitespace.
[...] trailing whitespace.
error: [...]
error: patch failed: ... :255
error: [...] : patch does not apply
[...]
I didn't find any 255 git errors, but I did find a promising one: git: patch does not apply Except this command produces error,
git apply --ignore-space-change --ignore-whitespace mychanges.patch
> error: unknown option `ignore-whitespace'
Same for the other --ignore-space-change option. A search at the Git Wiki could not find these commands. I'm using Linux/Fedora F11, a few years old, but I'm a newbie and not going for linux certification :). What is the equivalent command for Linux/Fedora?
PS. Yes, just what I was thinking. Git is slang for idiot, which is synonymous for newbie
UPDATE Below is the new message from git. Is this half fixed?
file_name.patch:26: trailing whitespace.
file_name.patch:39: trailing whitespace.
Checking patch file_name...
Hunk #1 succeeded at 294 (offset 6 lines).
Checking patch file_name.inc...
Hunk #1 succeeded at 23 (offset -1 lines).
Checking patch [...]
Hunk #1 succeeded at 79 (offset 12 lines).
error: while searching for:
[...]
error: patch failed: file_name:255
error:开发者_运维问答 file_name: patch does not apply
Checking patch file_name...
Hunk #1 succeeded at 17 (offset 4 lines).
What do you get from git --version
? --ignore-whitespace
was added in version 1.6.5. Assuming you have an older version and don't want to upgrade, maybe --whitespace=fix
would help?
精彩评论