Skip to content

Commit 560fe76

Browse files
authored
[docs] Point to git bisect --first-parent (#171728)
Introduced in Git 2.29 (Oct 2020).
1 parent 54ae122 commit 560fe76

File tree

1 file changed

+2
-18
lines changed

1 file changed

+2
-18
lines changed

llvm/docs/GitBisecting.rst

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -100,24 +100,8 @@ Here's how LLVM's history currently looks:
100100
merged, at every revision at ``C`` or earlier, *only* the ``mlir/`` directory
101101
exists, and nothing else does.
102102

103-
As of early 2020, there is no flag to ``git bisect`` to tell it to not
104-
descend into all reachable commits. Ideally, we'd want to tell it to only
105-
follow the first parent of ``D``.
106-
107-
The best workaround is to pass a list of directories to ``git bisect``:
108-
If you know the bug is due to a change in llvm, clang, or compiler-rt, use
109-
110-
.. code-block:: bash
111-
112-
git bisect start -- clang llvm compiler-rt
113-
114-
That way, the commits in ``mlir`` are never evaluated.
115-
116-
Alternatively, ``git bisect skip aed0d21a6 aed0d21a6..0f0d0ed1c78f`` explicitly
117-
skips all commits on that branch. It takes 1.5 minutes to run on a fast
118-
machine, and makes ``git bisect log`` output unreadable. (``aed0d21a6`` is
119-
listed twice because git ranges exclude the revision listed on the left,
120-
so it needs to be ignored explicitly.)
103+
``git bisect --first-parent`` tells git to only descend into the first parent
104+
of commits, meaning ``B..C`` will never be searched from ``D``.
121105

122106
More Resources
123107
==============

0 commit comments

Comments
 (0)