Skip to content

scrub: report VCS errors instead of silent swallow#22

Open
nothingmuch wants to merge 1 commit into
mainfrom
scrub-error-reporting
Open

scrub: report VCS errors instead of silent swallow#22
nothingmuch wants to merge 1 commit into
mainfrom
scrub-error-reporting

Conversation

@nothingmuch
Copy link
Copy Markdown
Collaborator

The revset resolution step redirected both stdout and stderr to /dev/null, so VCS failures (bad revset, incompatible index, missing repo) silently produced an empty commit list and printed the misleading message "No commits in range."

@nothingmuch nothingmuch marked this pull request as ready for review May 26, 2026 21:15
Copy link
Copy Markdown

@bc1cindy bc1cindy left a comment

Choose a reason for hiding this comment

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

ACK

The revset resolution step redirected both stdout and stderr to
/dev/null, so VCS failures (bad revset, incompatible index, missing
repo) silently produced an empty commit list and printed the
misleading message "No commits in range."

Now capture stdout into a variable (stderr flows through to the
caller directly). Check exit codes and bail on failure.

On the jj side, the elif chain is simplified: the use_log_revset
case falls through with no -r flag (jj uses its default revset),
removing a redundant branch. The git side keeps its parallel
structure unchanged.
@nothingmuch nothingmuch force-pushed the scrub-error-reporting branch from dc3a9d1 to 7ca7991 Compare May 28, 2026 00:54
Copy link
Copy Markdown
Collaborator

@arminsabouri arminsabouri left a comment

Choose a reason for hiding this comment

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

Ack

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