0

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).
Community
  • 1
  • 1
xtian
  • 2,765
  • 7
  • 38
  • 65

1 Answers1

0

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?

dahlbyk
  • 75,175
  • 8
  • 100
  • 122
  • Oi! Why does everyone say I don't "want" to upgrade when your software is not cooperating? FFt! I tried "yum install python-software-properties" supposed to update git clone, and "yum update git" and one other. Its not working. I'm version 1.6.2 :( – xtian Jun 25 '11 at 15:27
  • --whitespace=fix didn't take. No option error, but the output was the same as the first error above... – xtian Jun 25 '11 at 15:32
  • UPDATE- I managed to make/confing an update to 1.7 despite instructions requiring libexpat1-dev and libssl-dev which I can't find for Fedora 11 (I did install somefin called expat1, and no luck with ssl). The --ignore-* options work... – xtian Jun 25 '11 at 18:10