Patching Your Git Tree

Often times, developers post test patches for users to test their programs with. Though this may seem overwhelming, it's quite simple. Simply download the patch (likely from bugzilla, or possibly from e-mail) and copy it to your wine source folder (often ~/wine-git/). Then run:

patch -p1 < patch_name.diff

This will patch the source code. It should return something similar to this:

patching file programs/winecfg/Pt.rc

Once this is done, simply compile again:

./configure && make depend && make

And rerun your program:

./wine "C:\Program Files\Program Name\program.exe"

See, that wasn't hard! Now if you're going to be testing any other programs, you don't want your tree cluttered with patches you were testing for another program. To reset your git tree run:

git checkout -f

This will undo any uncommitted changes in your local git tree.

Reverting Patches in Git

If you've been the victim of a regression in wine, you probably want to revert that patch in your local build. While you can use git-revert, it's pretty messy. Instead, use git show along with some terminal voodoo:

git show c959867510703a100106f292cd26cb8f489236bb | patch -p1 -R

This will show the patch in question, pipe this information to the patch program, and revert it.