[OE-core] [PATCH] buildhistory: record removals with Git 2.0 and later

Jonathan Liu net147 at gmail.com
Fri May 31 09:42:15 UTC 2013


There is a behavior change with Git 2.0 where "git add ." will no
longer record removals by default unless -A (--all) is specified.
Change to "git add -A ." so removals are recorded with Git 2.0 and
later.

Signed-off-by: Jonathan Liu <net147 at gmail.com>
---
 meta/classes/buildhistory.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index d39408b..b12da4a 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -510,7 +510,7 @@ END
 		repostatus=`git status --porcelain | grep -v " metadata-revs$"`
 		HOSTNAME=`hostname 2>/dev/null || echo unknown`
 		if [ "$repostatus" != "" ] ; then
-			git add .
+			git add -A .
 			# porcelain output looks like "?? packages/foo/bar"
 			# Ensure we commit metadata-revs with the first commit
 			for entry in `echo "$repostatus" | awk '{print $2}' | awk -F/ '{print $1}' | sort | uniq` ; do
-- 
1.8.3




More information about the Openembedded-core mailing list