[llvm] [llvm][docs] Reorder Stacked PR approaches in GitHub.rst (PR #138126)
Andrzej Warzyński via llvm-commits
llvm-commits at lists.llvm.org
Thu May 1 07:28:04 PDT 2025
================
@@ -274,8 +264,25 @@ Your options are as follows:
This approach allows GitHub to display clean, incremental diffs for each PR
in the stack, making it much easier for reviewers to see what has changed at
- each step. Once `feature_1` is merged, you can rebase and re-target
- `feature_2` to `main`.
+ each step. Once `feature_1` is merged, GitHub would automatically rebase and
+ re-target your branch `feature_2` to `main`. For more complex stacks, you can
+ perform this step using the web interface.
+
+ This approach requires
+ `Commit Access <https://llvm.org/docs/DeveloperPolicy.html#obtaining-commit-access>`_
+ . However, if you are involved with a Stacked PR, there's a good chance you'll
+ be granted access.
+
+#. Two PRs with a dependency note
+
+ Create PR_1 for `feature_1` and PR_2 for `feature_2`. In PR_2, include a
+ note in the PR summary indicating that it depends on PR_1 (e.g.,
+ “Depends on #PR_1”).
+
+ The disadvantage of this approach is that GitHub will not show a clean diff.
----------------
banach-space wrote:
Note the `note` below:
> When not using user branches, GitHub will not display proper diffs for
subsequent PRs in a stack. Instead, it will show a combined diff that
includes all commits from earlier PRs
https://github.com/llvm/llvm-project/pull/138126
More information about the llvm-commits
mailing list