Allow empty commits, this also give a nice speedup since 'git status --porcelain' doesn't need to get run.
Signed-off-by: Koen Kooi <[email protected]> --- meta/classes/buildhistory.bbclass | 17 +++++++---------- 1 files changed, 7 insertions(+), 10 deletions(-) diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass index f99aa7f..1926d12 100644 --- a/meta/classes/buildhistory.bbclass +++ b/meta/classes/buildhistory.bbclass @@ -396,16 +396,13 @@ buildhistory_commit() { if [ ! -d .git ] ; then git init -q fi - # Ensure there are new/changed files to commit - repostatus=`git status --porcelain` - if [ "$repostatus" != "" ] ; then - git add ${BUILDHISTORY_DIR}/* - HOSTNAME=`hostname 2>/dev/null || echo unknown` - git commit ${BUILDHISTORY_DIR}/ -m "Build ${BUILDNAME} of ${DISTRO} ${DISTRO_VERSION} for machine ${MACHINE} on $HOSTNAME" --author "${BUILDHISTORY_COMMIT_AUTHOR}" > /dev/null - if [ "${BUILDHISTORY_PUSH_REPO}" != "" ] ; then - git push -q ${BUILDHISTORY_PUSH_REPO} - fi - fi) || true + git add ${BUILDHISTORY_DIR}/* + HOSTNAME=`hostname 2>/dev/null || echo unknown` + git commit ${BUILDHISTORY_DIR}/ --allow-empty -m "Build ${BUILDNAME} of ${DISTRO} ${DISTRO_VERSION} for machine ${MACHINE} on $HOSTNAME" --author "${BUILDHISTORY_COMMIT_AUTHOR}" > /dev/null + if [ "${BUILDHISTORY_PUSH_REPO}" != "" ] ; then + git push -q ${BUILDHISTORY_PUSH_REPO} + fi + ) || true } python buildhistory_eventhandler() { -- 1.7.2.5 _______________________________________________ Openembedded-core mailing list [email protected] http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
