From: Paul Eggleton Date: Wed, 8 Nov 2017 22:07:15 +0000 (+1300) Subject: devtool: upgrade: fix not committing deleted files with older git versions X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~19577 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c7f4c9f050c11c0de7fcf5badcc19a8fbc6428cf;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git devtool: upgrade: fix not committing deleted files with older git versions 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 Signed-off-by: Ross Burton --- diff --git a/scripts/lib/devtool/upgrade.py b/scripts/lib/devtool/upgrade.py index 4cfab0cb193..073002ba49a 100644 --- a/scripts/lib/devtool/upgrade.py +++ b/scripts/lib/devtool/upgrade.py @@ -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)