diff mbox series

[3/5] bitbake-setup: allow empty commits in configuration history repo

Message ID 20260109132000.2372791-3-alex.kanavin@gmail.com
State Accepted, archived
Commit 77e86f9c8e61f4b70aed63bd22cd7bc743d55d77
Headers show
Series [1/5] doc: document fixed revisions override in bitbake-setup manual | expand

Commit Message

Alexander Kanavin Jan. 9, 2026, 1:19 p.m. UTC
From: Alexander Kanavin <alex@linutronix.de>

This can happen when a user has checked out a different commit
in a component under layers/. 'bitbake-setup update' will reset
to the commit in the configuration, but there will be no changes
to it, and so no difference in the config history repo to be
committed.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
 bin/bitbake-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/bin/bitbake-setup b/bin/bitbake-setup
index 4ccf47e87..93c11bd09 100755
--- a/bin/bitbake-setup
+++ b/bin/bitbake-setup
@@ -81,7 +81,7 @@  def write_sources_fixed_revisions(config_dir, layer_dir, config_data):
 
 def commit_config(config_dir):
     bb.process.run("git -C {} add .".format(config_dir))
-    bb.process.run("git -C {} commit --no-verify -a -m 'Configuration at {}'".format(config_dir, time.asctime()))
+    bb.process.run("git -C {} commit --allow-empty --no-verify -a -m 'Configuration at {}'".format(config_dir, time.asctime()))
 
 def _write_layer_list(dest, repodirs):
     layers = []