ifcurl/forgejo/server-config/gitattributes
Bruno Postle 8e474f2629 gitconfig-ifcmerge: use --prioritise-local correctly per merge direction
ifcmerge defaults to preserving remote IDs; --prioritise-local preserves local
IDs instead.  For Forgejo merge commits, %A is main (local) so ifcmerge_ours
(--prioritise-local) is the right driver — main's IDs are preserved and the
PR branch is renumbered.  For developer rebases from main, %B is main (remote)
so the plain ifcmerge driver (no flag) preserves main's IDs by default.

Update /etc/gitattributes to use ifcmerge_ours for server-side merges, and
update README with a direction table clarifying which driver to use when.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 07:41:49 +01:00

12 lines
472 B
Text

# System-wide gitattributes for the Forgejo server.
# Reference this file from /etc/gitconfig:
#
# [core]
# attributesFile = /etc/gitattributes
#
# This causes git merge-tree --write-tree (used by Forgejo's mergeability
# check) to invoke ifcmerge for .ifc files in bare repositories.
# Committed per-repo .gitattributes files are NOT read by git in bare-repo
# context and are therefore insufficient for the server-side conflict check.
*.ifc merge=ifcmerge_ours