221-magic-add-git.patch 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. Author: Adam Buchbinder <adam.buchbinder@gmail.com>
  2. Description:
  3. Add detection for git packs and indexes, making sure it doesn't clash with id
  4. Software PACK files (Closes: #509942).
  5. diff -Naurp file.orig/magic/Magdir/games file/magic/Magdir/games
  6. --- file.orig/magic/Magdir/games 2009-03-21 09:20:03.000000000 +0000
  7. +++ file/magic/Magdir/games 2009-03-21 17:13:30.000000000 +0000
  8. @@ -33,6 +33,7 @@
  9. # Quake
  10. 0 string PACK Quake I or II world or extension
  11. +>8 lelong >0 \b, %d entries
  12. #0 string -1\x0a Quake I demo
  13. #>30 string x version %.4s
  14. diff -Naurp file.orig/magic/Magdir/revision file/magic/Magdir/revision
  15. --- file.orig/magic/Magdir/revision 2009-03-21 09:20:03.000000000 +0000
  16. +++ file/magic/Magdir/revision 2009-03-21 17:13:30.000000000 +0000
  17. @@ -12,6 +12,21 @@
  18. # From: Josh Triplett <josh@freedesktop.org>
  19. 0 string #\ v2\ git\ bundle\n Git bundle
  20. +# Type: Git pack
  21. +# From: Adam Buchbinder <adam.buchbinder@gmail.com>
  22. +# The actual magic is 'PACK', but that clashes with Doom/Quake packs. However,
  23. +# those have a little-endian offset immediately following the magic 'PACK',
  24. +# the first byte of which is never 0, while the first byte of the Git pack
  25. +# version, since it's a tiny number stored in big-endian format, is always 0.
  26. +0 string PACK\0 Git pack
  27. +>4 belong >0 \b, version %d
  28. +>>8 belong >0 \b, %d objects
  29. +
  30. +# Type: Git pack index
  31. +# From: Adam Buchbinder <adam.buchbinder@gmail.com>
  32. +0 string \377tOc Git pack index
  33. +>4 belong =2 \b, version 2
  34. +
  35. # Type: Mercurial bundles
  36. # From: Seo Sanghyeon <tinuviel@sparcs.kaist.ac.kr>
  37. 0 string HG10 Mercurial bundle,