Repository navigation
Expand file tree
/
Copy path.gitattributes
More file actions
48 lines (46 loc) · 2.67 KB
/
Copy path.gitattributes
File metadata and controls
48 lines (46 loc) · 2.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Vendored third-party sources are checked out byte-for-byte on every platform
# (no CRLF conversion), so each vendor's anchored checksums (VENDOR.json,
# verified by the vendoring tests) match on Windows too. Without this a Windows
# checkout with core.autocrlf=true rewrites LF->CRLF and every checksum drifts.
third_party/** -text
# Every entry in CHANGELOG.md is inserted at the same anchor — the top of
# `## [Unreleased]` → `### Fixed` — so any two pull requests open at the same
# time edit the same region and git stops on a conflict. That is not an
# occasional collision: 17 of the 30 pull requests before this one touched the
# file, and each merge invalidates every other open branch, so N concurrent PRs
# cost N-1 rebases on a file that has never affected behavior. Four landed in
# one afternoon (#653, #656, #662, #663), each one blocking a PR whose code
# merged cleanly.
#
# `union` is git's built-in driver for exactly this shape: both sides' added
# lines are kept instead of conflicting. It does NOT understand the list, so it
# does not guarantee the newest entry lands on top — check the order when it
# resolves one, and expect to reorder occasionally. It also resolves silently,
# which is only safe because `check-merge-conflict` backs it up (issue #664 —
# that hook is currently a no-op in CI, so land its fix alongside this).
#
# Two limits, both measured rather than assumed:
#
# - GitHub's merge machinery ignores .gitattributes, so a concurrent PR still
# reports a conflict on github.com and `Update branch` still will not clear
# it. This only helps merges run by git. Clearing one means merging locally
# and pushing.
# - git reads .gitattributes from the PRE-merge checkout, so a branch older
# than this line does not benefit from it on its first merge with main. For
# one of those:
# git merge origin/main # CHANGELOG.md conflicts
# git checkout -m -- CHANGELOG.md # re-run it, driver now readable
# git add CHANGELOG.md
#
# This is a mitigation. The structural fix is one changelog fragment file per
# change, assembled at release, so two PRs never touch the same file at all —
# issue #668.
CHANGELOG.md merge=union
# The test-count guards (issue #584) run ci/check_test_count.sh under Git Bash on
# the Windows legs, and a windows-latest checkout rewrites LF to CRLF (the
# core.autocrlf behaviour f562ae3 records). Bash does not strip the \r, so
# `set -euo pipefail\r` kills the script before it reads a count, and both
# Windows legs go red at the guard step. The bounds file it reads is pinned too;
# the helper tolerates a CRLF one, and this keeps it from having to.
ci/*.sh text eol=lf
ci/*.env text eol=lf