[oe-commits] Paul Eggleton : classes/buildhistory: do git garbage collection after committing
git at git.openembedded.org
git at git.openembedded.org
Tue Dec 3 12:43:39 UTC 2013
Module: openembedded-core.git
Branch: master-next
Commit: 4a45a999e0ad2e99581428a5a6d34f483c00544f
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=4a45a999e0ad2e99581428a5a6d34f483c00544f
Author: Paul Eggleton <paul.eggleton at linux.intel.com>
Date: Mon Dec 2 18:50:51 2013 +0000
classes/buildhistory: do git garbage collection after committing
We don't normally perform any operations (such as "git pull") that
trigger "git gc --auto", thus garbage collection never happens which
means performance of accessing the repository degrades noticeably over
time. Add an explicit "git gc --auto" to clean things up when needed.
Thanks to Elijah Newren and Ross Burton for suggesting this.
Signed-off-by: Paul Eggleton <paul.eggleton at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/classes/buildhistory.bbclass | 1 +
1 file changed, 1 insertion(+)
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index e46b124..d25496d 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -533,6 +533,7 @@ END
for entry in `echo "$repostatus" | awk '{print $2}' | awk -F/ '{print $1}' | sort | uniq` ; do
git commit $entry metadata-revs -m "$entry: Build ${BUILDNAME} of ${DISTRO} ${DISTRO_VERSION} for machine ${MACHINE} on $HOSTNAME" -m "cmd: $CMDLINE" --author "${BUILDHISTORY_COMMIT_AUTHOR}" > /dev/null
done
+ git gc --auto
if [ "${BUILDHISTORY_PUSH_REPO}" != "" ] ; then
git push -q ${BUILDHISTORY_PUSH_REPO}
fi
More information about the Openembedded-commits
mailing list