]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
devtool: upgrade: fix not committing deleted files with older git versions
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Wed, 8 Nov 2017 22:07:15 +0000 (11:07 +1300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 10 Nov 2017 14:44:31 +0000 (14:44 +0000)
With versions of git older than 2.0, "git add" on a deleted file (i.e.
in this case a file that was removed between versions) will not add the
delete to be committed by default, with the result that the rebase of
patches on top of the new branch will fail. We need to use the -A
option in order to force that for older git versions.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
scripts/lib/devtool/upgrade.py

index 4cfab0cb193b0e14fb1b046be7b8e04955e87f53..073002ba49a9d831c678d80f79261d23e15dffc6 100644 (file)
@@ -252,7 +252,7 @@ def _extract_new_source(newpv, srctree, no_patch, srcrev, srcbranch, branch, kee
 
         (stdout,_) = __run('git ls-files --modified --others --exclude-standard')
         for f in stdout.splitlines():
-            __run('git add "%s"' % f)
+            __run('git add -A "%s"' % f)
 
         useroptions = []
         oe.patch.GitApplyTree.gitCommandUserOptions(useroptions, d=rd)