Skip to content

fix(pull): match git no-upstream advice#424

Merged
genedna merged 1 commit into
mainfrom
codex/status-untracked-scan
Jul 5, 2026
Merged

fix(pull): match git no-upstream advice#424
genedna merged 1 commit into
mainfrom
codex/status-untracked-scan

Conversation

@genedna

@genedna genedna commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Signed-off-by: Eli Ma <eli@patch.sh>
Copilot AI review requested due to automatic review settings July 5, 2026 08:15
@genedna genedna merged commit 8e1fa9b into main Jul 5, 2026
4 of 10 checks passed
@genedna genedna deleted the codex/status-untracked-scan branch July 5, 2026 08:15

Copilot AI left a comment

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.

Pull request overview

This PR updates libra pull’s “no upstream / no tracking” failure path to match Git’s unprefixed advisory block (rather than an error: line), while preserving the existing stable error code (LBR-REPO-003) and exit code (128). It introduces a dedicated CliErrorKind variant to support Git-style unprefixed runtime failures and updates tests/docs/compat notes accordingly.

Changes:

  • Add CliErrorKind::UnprefixedFailure + CliError::unprefixed_failure(...) to render runtime advisory blocks without error: / fatal: prefixes.
  • Update pull’s missing-tracking handling to emit Git-style advice, and to include the single configured remote name in --set-upstream-to=... when exactly one remote exists.
  • Update integration tests and documentation to reflect the new advisory output and compatibility behavior.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/command/pull_test.rs Tightens assertions for Git-style “no tracking” stderr and adds coverage for single-remote upstream advice.
src/utils/error.rs Introduces UnprefixedFailure to support unprefixed Git-style runtime advisory rendering (plus unit test).
src/command/pull.rs Emits Git-style no-tracking advice (merge vs rebase wording; single-remote hinting) instead of prefixed error + hints.
docs/development/commands/pull.md Documents the Git-style advisory behavior and the single-remote substitution rule.
docs/commands/zh-CN/pull.md Adds user-facing example + updates scenario table to describe advisory-block output.
docs/commands/pull.md Adds user-facing example + updates scenario table to describe advisory-block output.
COMPATIBILITY.md Notes the new Git-style no-upstream tracking advice behavior under pull.

Comment on lines +145 to +149
}

#[test]
#[serial]
fn test_pull_cli_without_tracking_uses_single_remote_in_advice() {
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.

2 participants