From: "Herton R. Krzesinski" <herton@xxxxxxxxxx> The git diff-index has a catch which you must pay attention, if you eg. do this: touch redhat/Makefile git diff-index HEAD It'll show there is a change even if contents didn't change. This makes the current logic to not work since we may not really have changed the contents, but the redirection will act similar as a touch on those files. We need to run update-index before it so diff-index check works properly. Also, the "exit 0" was not working as intended, and the Makefile commands after the check were still running, thus I changed the code to use an if conditional to make it work. Signed-off-by: Herton R. Krzesinski <herton@xxxxxxxxxx> --- redhat/Makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/redhat/Makefile b/redhat/Makefile index 3cb52956ff7e..0a7654e8fd28 100644 --- a/redhat/Makefile +++ b/redhat/Makefile @@ -304,9 +304,13 @@ dist-release-changed: setup-source @cp $(SOURCES)/$(CHANGELOG) $(REDHAT)/$(CHANGELOG) @echo $(MARKER) > $(REDHAT)/marker @# if neither changelog nor marker was updated, skip bumping a release - git diff-index --quiet HEAD && (echo "Nothing changed, skipping updates"; exit 0) || true - $(REDHAT)/scripts/new_release.sh $(REDHAT) $(__YSTREAM) $(__ZSTREAM) - @$(MAKE) dist-release-finish + @git update-index -q --really-refresh + @if git diff-index --quiet HEAD; then \ + echo "Nothing changed, skipping updates"; \ + else \ + $(REDHAT)/scripts/new_release.sh $(REDHAT) $(__YSTREAM) $(__ZSTREAM); \ + $(MAKE) dist-release-finish; \ + fi dist-release: dist-clean-sources @$(MAKE) dist-release-changed dist-release-tag: -- GitLab _______________________________________________ kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx