Jump to content

Help with the patches


Guest Shin Darth

Recommended Posts

I'm sorry for the noob question, but I don't know how I apply the patches for mangos wich are not implemented with the master branch.

I tried with the command:

git am $(ls /patches/xxx.patch | grep -v gz)

but the console give me this error:

Patch does not have a valid e-mail address.

how I have to do to apply the patches?

sorry for my english

Link to comment
Share on other sites

there are 2 types of patches, the first one you apply with 'git am' and the 2nd with 'git apply'.

the first one has a full commit info in his header (commiter, commiter-email, commit-comment, etc.) and the 2nd only has the diff file.

so for your patch it seems like you'll need 'git apply' instead of 'git am' ;)

Link to comment
Share on other sites

that has nothing to do with .patch/.diff, you have to look into the file and look at the first few lines. if there's somthing like 'author:' and all that stuff, then you'll have to use 'git am' else 'git apply'.

and yes, syntax is:

git apply /path/to/my.patch
git am /path/to/my.patch

and i've no idea about the git gui, i've never used it ;)

Link to comment
Share on other sites

for a normal patchfile (recomended):

git diff key1 key2 > /path/to/my.diff

where key1 and key2 defines the sha1 key from the two commits.

git diff > /path/to/my.diff

generates a diff file between the local version and the HEAD version from the actual branch

for the other version (with header):

- commit your changes:

git commit -a -v

- get the commit info into the file

git show key > /path/to/my.patch

where key is the sha1 key from your commit.

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use