]> code.ossystems Code Review - openembedded-core.git/commitdiff
classes/buildhistory: do git garbage collection after committing
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Mon, 2 Dec 2013 18:50:51 +0000 (18:50 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 3 Dec 2013 12:44:48 +0000 (12:44 +0000)
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@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/buildhistory.bbclass

index e46b124bbbd485aa77aaa935712084d5bdbff5c6..d25496d0daacc4ce848242107360e8d76b965f99 100644 (file)
@@ -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