[llvm] Update GitHub doc to mention that we accepts user branches for Stacked PRs (PR #73774)

Mehdi Amini via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 29 22:47:31 PST 2023


https://github.com/joker-eph updated https://github.com/llvm/llvm-project/pull/73774

>From 8d47a294bb8ff52ecb928bd4dee9079c0a4fd09c Mon Sep 17 00:00:00 2001
From: Mehdi Amini <joker.eph at gmail.com>
Date: Wed, 29 Nov 2023 02:14:08 -0800
Subject: [PATCH] Update GitHub doc to mention that we accepts user branches
 for Stacked PR.

This isn't yet a guide on how to do stacked PRs.
---
 llvm/docs/GettingStarted.rst | 6 ++++++
 llvm/docs/GitHub.rst         | 9 +++++----
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/llvm/docs/GettingStarted.rst b/llvm/docs/GettingStarted.rst
index 048d521670f5c7e..86dcc5ecf9499f8 100644
--- a/llvm/docs/GettingStarted.rst
+++ b/llvm/docs/GettingStarted.rst
@@ -40,6 +40,12 @@ Getting the Source Code and Building LLVM
 
      ``git clone --depth 1 https://github.com/llvm/llvm-project.git``
 
+   * You are likely only interested in the main branch moving forward, if
+     you don't want `git fetch` (or `git pull`) to download user branches, use:
+
+     ``sed 's#fetch = +refs/heads/\*:refs/remotes/origin/\*#fetch = +refs/heads/main:refs/remotes/origin/main#'
+          llvm-project/.git/config``
+
 #. Configure and build LLVM and Clang:
 
    * ``cd llvm-project``
diff --git a/llvm/docs/GitHub.rst b/llvm/docs/GitHub.rst
index 67fea9520aab6de..a89a4d955fc08b2 100644
--- a/llvm/docs/GitHub.rst
+++ b/llvm/docs/GitHub.rst
@@ -17,10 +17,11 @@ participate in the project using GitHub.
 
 Branches
 ========
-Do not create any branches in the llvm/llvm-project repository.  This repository
-is reserved for official project branches only.  We may relax this rule in
-the future if needed to support "stacked" pull request, but in that case only
-branches being used for "stacked" pull requests will be allowed.
+
+It is possible to create branches that starts with `users/<username>/`, however this is
+intended to be able to support "stacked" pull-request. Do not create any branches in the
+llvm/llvm-project repository otherwise, please use a fork (see below). User branches that
+aren't associated with a pull-request **will be deleted**.
 
 Pull Requests
 =============



More information about the llvm-commits mailing list