Skip to content

fix(git): Remove ref status update when showing progress - #17400

Merged
weihanglo merged 5 commits into
rust-lang:masterfrom
epage:git-progress
Aug 28, 2026
Merged

fix(git): Remove ref status update when showing progress #17400
weihanglo merged 5 commits into
rust-lang:masterfrom
epage:git-progress

Conversation

@epage

@epage epage commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

What does this PR try to resolve?

Trying to make the output cleaner, particularly on ambiguous refs, in prep for #17329

How to test and review this PR?

Since progress does not have end-to-end tests,
I ran

cargo new git-dep
cd git-dep
cargo add cargo --git https://github.com/rust-lang/cargo/
rm -rf ~/.cargo/git
CARGO_NET_GIT_FETCH_WITH_CLI=true nargo check

Remaining git output is:

remote: Enumerating objects: 187021, done.
remote: Counting objects: 100% (326/326), done.
remote: Compressing objects: 100% (155/155), done.
remote: Total 187021 (delta 241), reused 177 (delta 171), pack-reused 186695 (from 3)
Receiving objects: 100% (187021/187021), 69.48 MiB | 4.90 MiB/s, done.
Resolving deltas: 100% (130194/130194), done.

@rustbot rustbot added the A-git Area: anything dealing with git label Aug 27, 2026
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 27, 2026
@rustbot

rustbot commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

r? @weihanglo

rustbot has assigned @weihanglo.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @epage, @weihanglo
  • @epage, @weihanglo expanded to epage, weihanglo

}

#[derive(Clone, Debug)]
pub enum Stdio {

@epage epage Aug 27, 2026

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.

Needed a clonable Stdio, so had to make my own

View changes since the review

Comment thread src/sources/git/utils.rs Outdated
Comment thread src/sources/git/utils.rs

cmd.arg("--force") // handle force pushes
.arg("--update-head-ok") // see discussion in #2078
.arg("--recurse-submodules=no") // we handle this, incompatible with `--porcelain`

@joshtriplett joshtriplett Aug 27, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

And we also don't want these anyway, typically, even if the user has enabled them. They just clone extra data we don't need.

View changes since the review

@joshtriplett joshtriplett left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

pub use self::read2::read2;
pub use du::du;
pub use process_builder::ProcessBuilder;
pub use process_builder::{ProcessBuilder, Stdio};

@weihanglo weihanglo Aug 27, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: I thought you liked one import per line.

View changes since the review

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.

This file did compound so I did.

Tempted to use nightly rustfmt...

@weihanglo
weihanglo added this pull request to the merge queue Aug 27, 2026
@weihanglo
weihanglo removed this pull request from the merge queue due to a manual request Aug 27, 2026

@weihanglo weihanglo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just FYI git fetch --porcelain was added in Git 2.41.0. So our MSGV is now 2.41.0

View changes since this review

Comment thread src/sources/git/utils.rs Outdated
Comment thread src/sources/git/utils.rs Outdated
Comment thread src/sources/git/utils.rs
Comment thread src/sources/git/utils.rs Outdated
epage added 5 commits August 27, 2026 21:05
Really, this is just a smaller, incremental step towards
- detecting git is present for an "auto" default
- version detecton for using different git features
Since progress does not have end-to-end tests,
I ran
```
cargo new git-dep
cd git-dep
cargo add cargo --git https://github.com/rust-lang/cargo/
rm -rf ~/.cargo/git
CARGO_NET_GIT_FETCH_WITH_CLI=true nargo check
```

@weihanglo weihanglo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@weihanglo
weihanglo added this pull request to the merge queue Aug 28, 2026
Merged via the queue into rust-lang:master with commit 19e7b54 Aug 28, 2026
29 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 28, 2026
@epage
epage deleted the git-progress branch August 28, 2026 11:09
rust-bors Bot pushed a commit to rust-lang/rust that referenced this pull request Sep 2, 2026
Update cargo submodule



26 commits in e8cb624d5701824f46a2ec5873cfd59ee3d2f66c..b2e9d5f9db3fb1c454ab84f10c16508984a266e2
2026-08-22 00:23:45 +0000 to 2026-09-02 14:49:16 +0000
- fix(parser): Resolve theoretical use-after-free (rust-lang/cargo#17428)
- fix(trim-paths)!: remove default scope from release profile (rust-lang/cargo#17424)
- fix(git): Use git's 429 retry, when available (rust-lang/cargo#17422)
- Avoid passing search path (-L) args when they are passed as --extern (rust-lang/cargo#17410)
- chore(deps): update crate-ci/typos action to v1.50.0 (rust-lang/cargo#17417)
- test: Move -Z onto its own line (rust-lang/cargo#17416)
- chore(triagebot): enable `@rustbot merge/delegate` (rust-lang/cargo#17415)
- Micro-optimize two package dir functions (rust-lang/cargo#17413)
- perf: Do not build SBOM if user has not set build.sbom (rust-lang/cargo#17412)
- feat(manifest)!: implement feature-metadata RFC3416 (rust-lang/cargo#15056)
- Cargo profiling improvements (rust-lang/cargo#17411)
- test(git): Remove gix override run in CI and the mode in code (rust-lang/cargo#17405)
- perf(git): Reduce extra work when using git-cli (rust-lang/cargo#17406)
- feat(resolver): Stabilize min-publish-age (rust-lang/cargo#17335)
- fix(git): Remove ref status update when showing progress  (rust-lang/cargo#17400)
- revert: refactor: move sysroot lookup to GlobalContext (rust-lang/cargo#17401)
- fix(run): Printing a new line to avoid overwriting error code after \r (rust-lang/cargo#17373)
- fix(trim-paths): custom workspace-relative member paths remap (rust-lang/cargo#17366)
- fix(home): rustdoc lint (rust-lang/cargo#17394)
- feat(diag): Stabilize cargo-lints  (rust-lang/cargo#17298)
- chore(deps): Update partial_ref to v0.3.4 (rust-lang/cargo#17392)
- refactor: remove ad-hoc `subslice_range` (rust-lang/cargo#17390)
- docs(changelog): move build-dir new layout to Changed (rust-lang/cargo#17387)
- chore(deps): update msrv (1 version) to v1.98 (rust-lang/cargo#17386)
- docs: Use mdbook admonitions (rust-lang/cargo#17384)
- chore(ci): exclude resolver-tests from intra doc link checks (rust-lang/cargo#17385)
@rustbot rustbot added this to the 1.100.0 milestone Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-git Area: anything dealing with git

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants