Skip to content

--patch: Show interactive output#121

Closed
anordal wants to merge 2 commits into
mystor:mainfrom
anordal:120-patch-interactively
Closed

--patch: Show interactive output#121
anordal wants to merge 2 commits into
mystor:mainfrom
anordal:120-patch-interactively

Conversation

@anordal

@anordal anordal commented Jan 19, 2022

Copy link
Copy Markdown
Contributor

Fixes #120

Comment thread gitrevise/tui.py
repo.git("add", "-u")
if args.patch:
repo.git("add", "-p")
repo.git("add", "-p", nocapture=True)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This was also fixed in this #99 (see discussion: #99 (comment)).

That PR has been ready to merge for quite a while. (cc @mystor @Manishearth @krobelus).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good to see. Our fixes are effectively the same. They would probably be identical if you were to reorder your commits to put the fix first.

I would typically put the fix first, though (to minimize the bug's lifetime in commits), even as you said in your commit that the mistake becomes obvious after making the argument explicit, which I think is a right response. There is some truth to python -c 'import this' | grep Explicit. However, as soon as all callers are explicit, I think the argument needn't/shouldn't be optional anymore. And as a consideration, if it helps verbosity: The distinction can also be made obligatory by wrapper functions, such as git_interactive() vs git_popen() vs git_silent().

Fixes a current CI failure. Alternatively,
lock black to the previous working version
(black==21.12b0).
@anordal anordal force-pushed the 120-patch-interactively branch from 60c92b5 to 21112da Compare February 2, 2022 23:52
@mystor

mystor commented Feb 5, 2022

Copy link
Copy Markdown
Owner

This was also fixed by #99 which I've now merged, so marking as closed. Thanks for the patch :-)

@mystor mystor closed this Feb 5, 2022
@anordal anordal deleted the 120-patch-interactively branch February 6, 2022 07:43
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.

--patch is not showing interactive output

3 participants