diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2013-12-02 18:50:51 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-12-03 17:45:50 +0000 |
commit | 1fa51bf949cf6e789b942c1b4c0321fd68a39b10 (patch) | |
tree | 2a873d10a6c3990743a9bd5c96927e4ad633347f /meta/classes/buildhistory.bbclass | |
parent | d51b3f375858cfcd3b2d90e53551f5705afa4eef (diff) | |
download | poky-1fa51bf949cf6e789b942c1b4c0321fd68a39b10.tar.gz |
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.
(From OE-Core rev: 4a45a999e0ad2e99581428a5a6d34f483c00544f)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/buildhistory.bbclass')
-rw-r--r-- | meta/classes/buildhistory.bbclass | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass index e46b124bbb..d25496d0da 100644 --- a/meta/classes/buildhistory.bbclass +++ b/meta/classes/buildhistory.bbclass | |||
@@ -533,6 +533,7 @@ END | |||
533 | for entry in `echo "$repostatus" | awk '{print $2}' | awk -F/ '{print $1}' | sort | uniq` ; do | 533 | for entry in `echo "$repostatus" | awk '{print $2}' | awk -F/ '{print $1}' | sort | uniq` ; do |
534 | 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 | 534 | 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 |
535 | done | 535 | done |
536 | git gc --auto | ||
536 | if [ "${BUILDHISTORY_PUSH_REPO}" != "" ] ; then | 537 | if [ "${BUILDHISTORY_PUSH_REPO}" != "" ] ; then |
537 | git push -q ${BUILDHISTORY_PUSH_REPO} | 538 | git push -q ${BUILDHISTORY_PUSH_REPO} |
538 | fi | 539 | fi |