.gitattributes 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #ident "@(#)$Format:LocalFoodAI_lanfr144:.gitattributes:%an:%ae:%ad:%cn:%ce:%cd:%H:%D:%N$"
  2. * text=auto
  3. # # 1. Forcer le format de date requis YYYY/MM/DD HH:MM:SS
  4. # git config log.date "format:%Y/%m/%d %H:%M:%S"
  5. #
  6. # # 2. Configurer le filtre "Smudge" (Injection lors du checkout / pull)
  7. # git config filter.ident-dynamic.smudge '
  8. # proj=$(basename "$(git rev-parse --show-toplevel)");
  9. # file="%f";
  10. # perl -pe "s|\\\$Format:LocalFoodAI_lanfr144:.gitattributes:%an:%ae:%ad:%cn:%ce:%cd:%H:%D:%N$|\\\$Format:LocalFoodAI_lanfr144:.gitattributes:%an:%ae:%ad:%cn:%ce:%cd:%H:%D:%N$proj:\$file:\$1\\\$|g" | \
  11. # git archive --subst-vars | cat
  12. # '
  13. #
  14. # # 3. Configurer le filtre "Clean" (Nettoyage avant le commit pour éviter les conflits)
  15. # # The LEFT PART OF THE PIPE MUST BE "$Format:PROJECT_NAME:FILE_NAME"
  16. # git config filter.ident-dynamic.clean '
  17. # perl -pe "s|\\\$Format:LocalFoodAI_lanfr144:.gitattributes:%an:%ae:%ad:%cn:%ce:%cd:%H:%D:%N$|\\\$Format:LocalFoodAI_lanfr144:.gitattributes:%an:%ae:%ad:%cn:%ce:%cd:%H:%D:%N$1\\\$|g"
  18. # '
  19. #
  20. # 1. Protection du script de filtre pour Unix/WSL
  21. # Force LF on checkout for all text files (prevents CRLF on Windows)
  22. * text eol=lf
  23. # Force CRLF and apply ident-dynamic filter for Windows batch files
  24. *.bat filter=ident-dynamic eol=crlf
  25. # Git filter configurations for dynamic identifiers
  26. .gitattributes filter=ident-dynamic
  27. local_tools/git-ident-filter.py filter=ident-dynamic eol=lf
  28. *.md filter=ident-dynamic
  29. *.py filter=ident-dynamic
  30. *.sh filter=ident-dynamic
  31. *.txt filter=ident-dynamic
  32. *.yml filter=ident-dynamic
  33. .env filter=ident-dynamic
  34. .env.example filter=ident-dynamic
  35. *.sql filter=ident-dynamic
  36. .gitignore filter=ident-dynamic
  37. Dockerfile filter=ident-dynamic
  38. # Binary files definition (prevents line ending normalization and text corruption)
  39. *.pdf binary
  40. *.zip binary
  41. *.png binary
  42. *.docx binary
  43. *.ttf binary