rust-lang / rust-lang/rust

Use `git diff --no-index` as the default diff in compiletest

Open
#132,602 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-compiletest A-test-infra C-enhancement T-bootstrap
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

Since not long ago, compiletest supports custom diffing tools in the config.
This is cool, but in practice probably not very used since it requires configuring it.
I think that compiletest should, when git is available, use git diff --no-index by default as the diff.
The default git diff is quite OK, and many people (me included) configure git to have an even prettier one. This way, people get a nice diff by default without configuring anything.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating compiletest's diff-tool configuration and the entry point that selects the default diff command. Check how custom diff tools and git availability are currently handled. Done means git diff --no-index is selected by default when git is available, while explicitly configured diff tools continue to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, rust
Domain
compilers, testing-qa
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.