-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitattributes
More file actions
24 lines (23 loc) · 1.32 KB
/
Copy path.gitattributes
File metadata and controls
24 lines (23 loc) · 1.32 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
# Pack files are maps, not text (PACK-SPEC.md). git's line merge can apply two
# branches' insertions of the SAME entry key at different anchors and leave the
# key in the file twice, which is not valid pack storage - pkg/pack refuses it and
# metafmt cannot re-render it. scripts/pack-union-merge.sh merges the entry maps
# instead, with the same three-way rules a person would apply, so name it here as
# the merge driver for the data tree.
#
# A driver only runs where it is configured, which keeps this additive: the intake
# sweep (.github/workflows/intake.yml) configures it, a contributor can with
#
# git config merge.packjson.name "three-way merge of pack-file entries"
# git config merge.packjson.driver "scripts/pack-union-merge.sh %O %A %B %P"
#
# and any checkout that has not falls back to git's own line merge exactly as
# before.
/data/**/*.json merge=packjson
# data/redirects.json is NOT a pack (it is the slug tombstone table, one small
# map of retired slug -> live slug), so the pack driver above must not be handed
# it. The driver refuses any file with no top-level "entries" object, so being
# handed it would leave the conflict unresolved - where git's own line merge
# resolves the common case and stops loudly on the rest. Unsetting the attribute
# restores that default for this one path.
/data/redirects.json !merge