Skip to content

Git().shortlog() not working #1433

@lcnittl

Description

@lcnittl

For some reason I cannot get output from Git().shortlog() anymore. Running on Windows 11 with Python 3.9.6 (same behavior on Ubuntu 20.04 (WSL2) with Python 3.8.10.

In [1]: import git

In [2]: git.__version__
Out[2]: '3.1.27'

In [3]: g = git.Git()

In [4]: g.status()
Out[4]: 'On branch master\nYour branch is up to date with \'origin/master\'.\n\nChanges not staged for commit:\n  (use "git add <file>..." to update what will be committed)\n  (use "git restore <file>..." to discard changes in working directory)\n\tmodified:   src/sphinxcontrib/scm/__init__.py\n\tmodified:   src/sphinxcontrib/scm/directives.py\n\tmodified:   src/sphinxcontrib/scm/roles.py\n\tmodified:   src/sphinxcontrib/scm/util.py\n\nUntracked files:\n  (use "git add <file>..." to include in what will be committed)\n\tpublish.ps1\n\nno changes added to commit (use "git add" and/or "git commit -a")'

In [5]: g.shortlog()
Out[5]: ''

git shortlog is working in the CLI:

PS scm> git shortlog
Christian Knittl-Frank (32):
      Initial commit
      ...

Any idea where this problem could originate from? Any more info I can provide to track down the issue?

Cheers!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions