From: Johannes Berg <johannes.berg@xxxxxxxxx> When the input tree had changes but the output doesn't get any changes at all, then the shortlog was being generated over all commits since no files were specified. Catch this special case and instead of generating a shortlog just add a note that no commits changed generated code. Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx> --- devel/git-tracker.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/devel/git-tracker.py b/devel/git-tracker.py index 05e915021c96..2820c61efae0 100755 --- a/devel/git-tracker.py +++ b/devel/git-tracker.py @@ -93,8 +93,12 @@ def handle_commit(args, msg, branch, treename, kernelobjdir, tmpdir, wgitdir, ba files = [] for d in git.status(tree=wdir): files.extend(d[1:]) - msg += git.shortlog(append_shortlog[0], append_shortlog[1], - tree=kernelobjdir, files=files) + if files: + msg += '\n' + append_shortlog[2] + '\n\n' + msg += git.shortlog(append_shortlog[0], append_shortlog[1], + tree=kernelobjdir, files=files) + else: + msg += "\nNo commits changed the generated code.\n\n" msg += '''%(newline)s %(PREFIX)sbackport: %(bprev)s @@ -242,16 +246,16 @@ if __name__ == '__main__': try: # add information about commits that went into this git.rev_parse('%s^2' % commit, tree=kernelobjdir) - msg += "\nCommits in this merge:\n\n" - append_shortlog = (prev, '%s^2' % commit) + append_shortlog = (prev, '%s^2' % commit, + "Commits in this merge:") except git.ExecutionError as e: # will fail if it wasn't a merge commit pass else: # multiple commits env = backport_author_env - msg = "update multiple kernel commits\n\nCommits taken:\n\n" - append_shortlog = (prev, commit) + msg = "update multiple kernel commits\n" + append_shortlog = (prev, commit, "Commits taken:") failure = handle_commit(args, msg, branch, tree, kernelobjdir, branch_tmpdir, wgitdir, backport_rev, commit, env=env, prev_kernel_rev=prev, defconfig=defconfig, -- 2.0.0.rc0 -- To unsubscribe from this list: send the line "unsubscribe backports" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html