[llvm] 76f3a08 - Update GettingStarted.rst doc with negative refspec to filter user branches (#75015)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 12 15:18:51 PDT 2024
Author: Mehdi Amini
Date: 2024-03-12T15:18:47-07:00
New Revision: 76f3a084e77991cffbb8108959457ffd75f8e9c8
URL: https://github.com/llvm/llvm-project/commit/76f3a084e77991cffbb8108959457ffd75f8e9c8
DIFF: https://github.com/llvm/llvm-project/commit/76f3a084e77991cffbb8108959457ffd75f8e9c8.diff
LOG: Update GettingStarted.rst doc with negative refspec to filter user branches (#75015)
This allows to keep fetching release branches as well.
Added:
Modified:
llvm/docs/GettingStarted.rst
Removed:
################################################################################
diff --git a/llvm/docs/GettingStarted.rst b/llvm/docs/GettingStarted.rst
index 705f6427d9ed53..7ecef78c405b6f 100644
--- a/llvm/docs/GettingStarted.rst
+++ b/llvm/docs/GettingStarted.rst
@@ -42,10 +42,14 @@ 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:
+ * You are likely not interested in the user branches in the repo (used for
+ stacked pull-requests and reverts), you can filter them from your
+ `git fetch` (or `git pull`) with this configuration:
- ``sed 's#fetch = +refs/heads/\*:refs/remotes/origin/\*#fetch = +refs/heads/main:refs/remotes/origin/main#' -i llvm-project/.git/config``
+.. code-block:: console
+
+ git config --add remote.origin.fetch '^refs/heads/users/*'
+ git config --add remote.origin.fetch '^refs/heads/revert-*'
#. Configure and build LLVM and Clang:
More information about the llvm-commits
mailing list