]> git.lizzy.rs Git - rust.git/blob - doc/backport.md
Rename the crates in source code
[rust.git] / doc / backport.md
1 # Backport Changes
2
3 Sometimes it is necessary to backport changes to the beta release of Clippy.
4 Backports in Clippy are rare and should be approved by the Clippy team. For
5 example, a backport is done, if a crucial ICE was fixed or a lint is broken to a
6 point, that it has to be disabled, before landing on stable.
7
8 Backports are done to the `beta` release of Clippy. Backports to stable Clippy
9 releases basically don't exist, since this would require a Rust point release,
10 which is almost never justifiable for a Clippy fix.
11
12
13 ## Backport the changes
14
15 Backports are done on the beta branch of the Clippy repository.
16
17 ```bash
18 # Assuming the current directory corresponds to the Clippy repository
19 $ git checkout beta
20 $ git checkout -b backport
21 $ git cherry-pick <SHA>  # `<SHA>` is the commit hash of the commit, that should be backported
22 $ git push origin backport
23 ```
24
25 After this, you can open a PR to the `beta` branch of the Clippy repository.
26
27
28 ## Update Clippy in the Rust Repository
29
30 This step must be done, **after** the PR of the previous step was merged.
31
32 After the backport landed in the Clippy repository, also the Clippy version on
33 the Rust `beta` branch has to be updated.
34
35 ```bash
36 # Assuming the current directory corresponds to the Rust repository
37 $ git checkout beta
38 $ git checkout -b clippy_backport
39 $ pushd src/tools/clippy
40 $ git fetch
41 $ git checkout beta
42 $ popd
43 $ git add src/tools/clippy
44 ยง git commit -m "Update Clippy"
45 $ git push origin clippy_backport
46 ```
47
48 After this you can open a PR to the `beta` branch of the Rust repository. In
49 this PR you should tag the Clippy team member, that agreed to the backport or
50 the `@rust-lang/clippy` team. Make sure to add `[beta]` to the title of the PR.