From b982f3cade17eda64f1ff40f09d712920431aa36 Mon Sep 17 00:00:00 2001 From: hugsy Date: Fri, 22 Oct 2021 11:27:11 -0700 Subject: [PATCH] Fixed minor bug in `new-release.py` in the `git` shell command --- gef.py | 1 + scripts/new-release.py | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/gef.py b/gef.py index a77ab2245..1bdc674c6 100644 --- a/gef.py +++ b/gef.py @@ -4552,6 +4552,7 @@ def pane_title(): return "example:pane" register_external_context_pane("example_pane", display_pane, pane_title) """ __gef__.add_context_pane(pane_name, display_pane_function, pane_title_function) + return # diff --git a/scripts/new-release.py b/scripts/new-release.py index 3dc665e1d..235ad5a0e 100644 --- a/scripts/new-release.py +++ b/scripts/new-release.py @@ -56,10 +56,10 @@ def generate_changelog(args: argparse.Namespace) -> bool: dbg("Adding contributor summary...") args.output_file.write(f"## Contributors{os.linesep}{os.linesep}") - contributor_names = shell(f"git log {latest_tag}... --pretty=format:'%aN' | sort -u").splitlines() + contributor_names = shell(f"git log {latest_tag}..HEAD --pretty=format:'%aN' | sort -u").splitlines() commits = {} for author in contributor_names: - author_commits = shell(f'git log {latest_tag}... --pretty=format:"%h" --author="{author}"').splitlines() + author_commits = shell(f'git log {latest_tag}..HEAD --pretty=format:"%h" --author="{author}"').splitlines() commits[ author ] = len(author_commits) total_commits = sum(commits.values()) @@ -90,8 +90,8 @@ def generate_changelog(args: argparse.Namespace) -> bool: """) dbg("Adding commit summary...") - log = shell(f"""git log "{latest_tag}"...HEAD --pretty=format:' * %cs [%h](https://github.com/{args.repository}/commit/%H) • *%aN* • %s ' --reverse""") - diff = shell(f"""git diff --no-color --stat {latest_tag} HEAD""") + log = shell(f"""git log {latest_tag}..HEAD --pretty=format:' * %cs [%h](https://github.com/{args.repository}/commit/%H) • *%aN* • %s ' --reverse""") + diff = shell(f"""git diff --no-color --stat {latest_tag}..HEAD""") args.output_file.write(f""" ## Commit details