mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:05:53 +01:00
[PR #621] [MERGED] tests: keep merge_check independent of the user's git ignore file (TEST-MERGE-CHECK-XDG-IGNORE) #662
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#662
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/621
Author: @DesertGamer
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @ubiquitarianism
Base:
main← Head:fix/merge-check-xdg-ignore📝 Commits (1)
283c881tests: keep merge_check independent of the user's git ignore file📊 Changes
1 file changed (+1 additions, -1 deletions)
View changed files
📝
tests/test_merge_check.py(+1 -1)📄 Description
Claimed in the coordination issue as: TEST-MERGE-CHECK-XDG-IGNORE (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7128205566)
What and why
tests/test_merge_check.pyisolates git from the user's configuration withGIT_CONFIG_GLOBAL=nulandGIT_CONFIG_NOSYSTEM=1, but git still reads its default global ignore file,$XDG_CONFIG_HOME/git/ignore(
~/.config/git/ignorewhen the variable is unset), becausecore.excludesFilefalls back to it without anyconfig. On a machine whose global ignore file lists
docs/,setUpstagesdocs/notes.md, git skips it, the firstcommit fails with "nothing to commit" and all 20 tests fail in
setUp.The test now also sets
XDG_CONFIG_HOMEto its temporary repository folder, which has nogit/ignore, so theresult no longer depends on the user's ignore rules.
Tested
python -I tests/test_merge_check.pywithdocs/in~/.config/git/ignore: 20 failures before,Ran 20 tests ... OKafter.git add -Aofdocs/notes.mdfollowed bygit commitprinted "nothing to commit".GPUs tested: n/a
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.