Browse Source

add filter "home-assistant-auth"

Replaces the entire refresh_tokens section rather than just its secrets, because every login adds an entry and last_used_at/last_used_ip change constantly, which would otherwise produce a diff on almost every commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fabian Peter Hammerle 3 days ago
parent
commit
f7130c7946
1 changed files with 5 additions and 0 deletions
  1. 5 0
      gitconfig

+ 5 - 0
gitconfig

@@ -47,6 +47,11 @@
 	smudge = cat
 	required = true
 
+[filter "home-assistant-auth"]
+	clean = jq '.data.refresh_tokens |= if . != null then \"…\" else . end'
+	smudge = cat
+	required = true
+
 [filter "home-assistant-config-entries"]
 	clean = jq '.data.entries[].data |= with_entries(if (.key | IN(\"password\", \"access_token\", \"noise_psk\")) and .value != null then .value = \"…\" else . end)' | eval \"$(git config --get filter.truncate-mac-address-to-24-bits.clean)\" | eval \"$(git config --get filter.truncate-dyness-battery-serial-numbers.clean)\"
 	smudge = cat