]> git.karo-electronics.de Git - karo-tx-uboot.git/commitdiff
Revert "patman: use -D option for git format-patch"
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Sun, 30 Aug 2015 16:23:32 +0000 (01:23 +0900)
committerSimon Glass <sjg@chromium.org>
Wed, 9 Sep 2015 13:48:03 +0000 (07:48 -0600)
This reverts commit 19b4a3369876f9215e2b861f211e8df1a75e26ca.

Since that commit, patman generates useless patches for file removal;
"git format -D" prints only the header but not the diff when deleting
files, and "git am" always refuses such patches.

The following is the quotation from "man git-format-patch":

  -D, --irreversible-delete
    Omit the preimage for deletes, i.e. print only the header but
    not the diff between the preimage and /dev/null. The resulting
    patch is not meant to be applied with patch nor git apply; this
    is solely for people who want to just concentrate on reviewing
    the text after the change. In addition, the output obviously
    lack enough information to apply such a patch in reverse, even
    manually, hence the name of the option.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Simon Glass <sjg@chromium.org>
tools/patman/gitutil.py

index 67b086bd69c57d458cb878f407aef278fa4df426..9e739d89b6ff7ac261d6bc96b6c66def4b7d2937 100644 (file)
@@ -264,7 +264,7 @@ def CreatePatches(start, count, series):
     """
     if series.get('version'):
         version = '%s ' % series['version']
-    cmd = ['git', 'format-patch', '-D', '-M', '--signoff']
+    cmd = ['git', 'format-patch', '-M', '--signoff']
     if series.get('cover'):
         cmd.append('--cover-letter')
     prefix = series.GetPatchPrefix()