Message ID | 20240207-ty-do-not-consume-commit-decorations-v1-1-995e5ff6666b@avm.de (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | [b4] ty: auto-matching: Do not consume commit decorations | expand |
On Wed, Feb 07, 2024 at 09:25:35AM +0100, Nicolas Schier wrote: > From: Nicolas Schier <nicolas@fjasle.eu> > > Disable decoration when reading git log output for getting a list of git > commits. > > Without '--no-decorate', commits that have branches or tags pointing to > them, will not be recognised by subject as get_all_commits will assume > that the decoration is part of the commits subject line, e.g.: > > (HEAD -> main, tag: v1.142, origin/main) Dummy commit subject oh, I forgot to mention that this is only true for those having git config log.decorate enabled. Kind regards, Nicolas
On Wed, 07 Feb 2024 09:25:35 +0100, Nicolas Schier wrote: > Disable decoration when reading git log output for getting a list of git > commits. > > Without '--no-decorate', commits that have branches or tags pointing to > them, will not be recognised by subject as get_all_commits will assume > that the decoration is part of the commits subject line, e.g.: > > [...] Applied, thanks! [1/1] ty: auto-matching: Do not consume commit decorations commit: 0fe26a3bbadfeb4a86f92b7b1e32aef203fe59f7 Best regards,
diff --git a/b4/ty.py b/b4/ty.py index 088933d..a8bdabf 100644 --- a/b4/ty.py +++ b/b4/ty.py @@ -164,7 +164,7 @@ def get_all_commits(gitdir: Optional[str], branch: str, since: str = '1.week', usercfg = b4.get_user_config() committer = usercfg['email'] - gitargs = ['log', '--committer', committer, '--no-abbrev', '--oneline', '--since', since, branch] + gitargs = ['log', '--committer', committer, '--no-abbrev', '--no-decorate', '--oneline', '--since', since, branch] lines = b4.git_get_command_lines(gitdir, gitargs) if not len(lines): logger.debug('No new commits from the current user --since=%s', since)