The SVN diff program cannot handle generating diffs between two different
authorshefty <shefty@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 20 May 2008 07:24:58 +0000 (07:24 +0000)
committershefty <shefty@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 20 May 2008 07:24:58 +0000 (07:24 +0000)
directories.  This file describes how to use an external diff program
to generate patches between two directories that can then be applied.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@1188 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

docs/generate-patch.txt [new file with mode: 0644]

diff --git a/docs/generate-patch.txt b/docs/generate-patch.txt
new file mode 100644 (file)
index 0000000..6529302
--- /dev/null
@@ -0,0 +1,18 @@
+Patches can be generated using the 'svn diff' utility if the changes are\r
+limited to a single branch in the svn tree.  However, to generate a patch\r
+by comparing two branches using a 'diff' program (e.g. GnuWin32 'diff'),\r
+the following syntax will help produce patches that are more easily\r
+reviewable:\r
+\r
+diff -up -r -X docs\dontdiff.txt -I \$Id: old_path new_path\r
+\r
+For full diff syntax information, see the diff documentation, but as a summary:\r
+\r
+-u  provides a unified diff (includes lines around changed lines for context)\r
+ p  lists the C function name containing the diff\r
+-r  does a recursive diff (use when old_path and new_path are directories)\r
+-X  excludes files listed in docs\dontdiff from the diff\r
+-I  ignores diffs caused by the SVN Id line\r
+\r
+Patches generated using this method can be applied by using a 'patch' program,\r
+such as GnuWin32 'patch'.
\ No newline at end of file