Parcourir la source

add filter "home-assistant-backup"

The backup list and timestamps change with every automatic backup, and the password decrypts the backup archives.

Paths missing from the file are left absent instead of being created with null.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fabian Peter Hammerle il y a 3 semaines
Parent
commit
166d8bb1a0
1 fichiers modifiés avec 5 ajouts et 0 suppressions
  1. 5 0
      gitconfig

+ 5 - 0
gitconfig

@@ -52,6 +52,11 @@
 	smudge = cat
 	required = true
 
+[filter "home-assistant-backup"]
+	clean = "jq 'reduce ([\"data\", \"backups\"], [\"data\", \"config\", \"last_attempted_automatic_backup\"], [\"data\", \"config\", \"last_completed_automatic_backup\"], [\"data\", \"config\", \"create_backup\", \"password\"]) as $p (.; if getpath($p) != null then setpath($p; \"…\") 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