Skip to content

Fix getting config from git config#79

Open
fallen wants to merge 1 commit intogetpatchwork:mainfrom
fallen:main
Open

Fix getting config from git config#79
fallen wants to merge 1 commit intogetpatchwork:mainfrom
fallen:main

Conversation

@fallen
Copy link
Copy Markdown

@fallen fallen commented Apr 15, 2026

Currently the CLI will store to the Config object
values from the argument parsing regardless of
whether they are None or not.

But if config.xxx is created, even with a None value the __getattr__ will never get called and thus will never lookup the git config value.

The fix is to only store non-None values from the
argument parsing to the Config object.

Without this patch, doing git pw series list will never work, even if server and project are configured in git config

Copy link
Copy Markdown
Member

@stephenfin stephenfin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this is a good catch. I have some small requests inlone

Comment thread git_pw/shell.py Outdated
Currently the CLI will store to the Config object
values from the argument parsing regardless of
whether they are None or not.

But if config.xxx is created, even with a None value
the __getattr__ will never get called and thus will
never lookup the git config value.

The fix is to only store non-None values from the
argument parsing to the Config object.

Signed-off-by: Yann Sionneau <yann.sionneau@vates.tech>
Co-authored-by: Stephen Finucane <stephen@that.guru>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants