Skip to content

Instantly share code, notes, and snippets.

@schacon
Created September 3, 2008 19:59
Show Gist options
  • Save schacon/8649 to your computer and use it in GitHub Desktop.
Save schacon/8649 to your computer and use it in GitHub Desktop.
$>ruby view_pack.rb pack-f1ad8eda574a36ef06e73182cf06fd6e663c6346.idx
["009c5154fa7b3221b5c9fa9291fcea07ea8b9a0a",
"08392dccdf7c777aaf1696e15097a1a9d428b8f3",
"08daca78a6f69ca2ef1ac78ba6b0c50ff9c3c938",
"09b3e450e8958d3f24965d7258aecc9fa7f8dd54",
"0b7646b0d4d62904328a47059159872e8c66d626",
"0b8e21cb52217088920c549e5632c939aed21e89",
"0edf99eb35f35fde0a15548069b7df258f907035",
"103d0b23bc3195205f8dbdf79833775bd43118e7",
"112cf9083b8410ecb3b1ffe6a4e00e029c0949e9",
"1242d9d10fa9c17bcd0e4a67c196c2778a4c597f",
"13c0b482b5feec20e81f63d71cf610355f421f2e",
"13d75be26633ea52eb20aa6521d8c4ebb25088cc",
"16c55dbdbac22a8e538bcfae4c7b84fb22fac6a3",
"18ba4d10df485581ab1748bbbf54b0a5ed367f1e",
"1db69d93e05055589f4e96c9881d35cc5c29f9a7",
"2137c826c44476fb23012a5198529e7502619bff",
"29658e800ee2f34bf4664f3ede71a357434b1d27",
"298d2fdf9ae351cfcaba62727e654930b9469c1a",
"299c3d031bc400a6179218583d15a3c3499f8602",
"2c4ea33b828d3b119c903d306820c64dbf812d00",
"300df5541c596d65107f84400d3de178e4001e98",
"30d24366665dcd0863cf87daf5783dad4a3f3e2d",
"3108b1491a139ee498a20841165522f5defecc1e",
"32b527b4e51ae4b19262fd65869841cc881371c0",
"336da3cad913b4da9f489861c4924dc1d5c7139a",
"3571fa908507215b48386f969763a1760db60d3d",
"39a867921c6102a80dbc5996a40b8fca652cc122",
"3ad94e43511313e4dbb239bc8d1be177a3f38e00",
"3f7171a8366e4fd3df866e3d3629396f8e72333d",
"465861b7f08df72b8290252f79b69c9eff7c8c96",
"4989a67954b42d62990c1c506e4c81004efc4699",
"4c2678a5bc50989a71518780437027110d9193bc",
"4dafd04d8e269de232e893d4cd8d81b0af48f9ea",
"4f97bf8bdef0826ffb9089c559de9b35f19de373",
"51f7b93530c9a746b6af34882511045dbf1064f5",
"5490b0d4a59c4a3ab9c61c996b770f4eac57387c",
"5663cd7cb66da8497d96ee9f60ce7abde440e6eb",
"57c58019f0bf2250a23e662a46f0b5ed082890c5",
"5a9085434a648e7cb496a50e6975459476b5f5f7",
"5dfb2e2ae8275ae8df33f1bf43fb11fa9875dc62",
"635ffabe7748e87465f263ce3d3a26929306cc28",
"642eba7e0d150401a88d0c3ec64d67e683dd512d",
"67dcf1608a567fda6e4b7f03b0a51b9e8e843c56",
"6d16a94d8e514f0c701faa809362eaa1d6595693",
"6ddf67ee4442ebdb059f886547cc29e2ebea4225",
"72b4eca7de5c6e390b03236b243f6a08805a1ab7",
"7304eca90a7e39219bc8138bfb157b8c1263c4c1",
"762f3679c0ff43c1fad8f201b91de56961d7098d",
"774a1751df3477637d6e82a9763eb6eab65461f0",
"781d82c1dbe72544b923f9d42e414d88213b2e54",
"7adfacc341f6bfbac015d85067553a60348056f2",
"7d8ee89d4b84414998b6110f17b6b738d8867a73",
"7fe27003e0ec748744a90438723e952251bb3ca5",
"8119a930d1184c04e07cb74d99a5730bc93d3ea6",
"831dece445c55a85d739b2b42a70d733bde9307c",
"852e2121cf01d264c6563c5319ed882bda7fd896",
"8642590331750f8f33e9b6674d4493b114e63ade",
"86b59e710b14f1dec8bf44ced1ba35284e562db4",
"87f1f725bbee7020481717658b7aeed830b0a4ac",
"88a1921d980ed46fbfb8e36972fd9c72a3147279",
"91f52a7385fffb2ca2715b6e666800aaaa099f88",
"95ded3b3991e6fc95237a931e99fee4709d9a583",
"95ef9e404716cf0fcc46af1ab213b0d9f63b07ba",
"9ce32a2826146e766659a303b025b966cc44853f",
"9f5c739fa301538e5e263262184ddac0e021de05",
"a3fe7cff0a86e6942df23ed20b9bc7a6d0571d60",
"a9ae54883b7479af9cf909da1a4e1dbc71f7875c",
"aaa9a85fa84a086649873c649e823cafd9b22df9",
"ad86e0a23cbd8a78aa36ed90c848651174eaf8a4",
"aff006f714742bd4d5b034dba05b60d5cda7f745",
"b0255d821df5cf6fcdc92a027592a2214d1d938e",
"b0b3a3ff0ae50b4589b74c2d40454c80b1e4e5bc",
"b2637919278c21dae0015f7d3982617bbdd24945",
"b484c3e3fcb749045a7a87242a4f18c6293e2ec7",
"b4873d8e1dae35c8bea7723d1eb201b1346bf9c4",
"b50a41ce254c7dba78d30c2f5d911f5be6d5bccc",
"b5bcbfd0b089a9996af04c69ac23479e9085a8c0",
"b9437bc7e93e3167e2f080288f4c87c97bd3f598",
"c0646540cd661561a036d44d985f32b897f1e506",
"c10836365d88d3112b1344de3344136b68ec0d10",
"c7f48dcc67aef9ce9806f74f3277b8f9a8543631",
"d11c85ab8b636b232ab15a06e244eaeeae34a208",
"d23bc62d8b4cd60fd0b8f98d25515a2466ad0a11",
"d32bc85fef5373cba74e57350ea8fe39cc9b84fd",
"d9dd204d2fe379c69141ac1c731005150cabf7eb",
"dbc9c37a6c66b8bfec5735e5b3a42519437fb58e",
"dcc391fda8602bbd773ba7ffbdff22dd9830b18a",
"ddf1c0e85d9c815bea0d0da7dee54b50af1aa8bb",
"e5339f72fb5ddbc8e7469518e8fd6e6b0928930b",
"e7769486f9305e44d61ecfec717d1e4b2251ee0a",
"e9e10fb9f31dd19f088f3345bc04f8a99d7f05b3",
"eb649ba3dfe26898a834a46c4d4604923f0ee41c",
"ec436c39351c110d9056aab6c5dfffd6e19046f6",
"ec938864b88e20b78ceaece597a61cb3a6f8a0c7",
"f1bbf63ba5da9640d5c8420b88e75e2b15b1b0bd",
"f3a4bfb71bd7ee72a21b63d288afb0cd804c2dd1",
"f5b611ed04453d4c91468a9c4b23e1ae73498bb6",
"f7dbd4da1dd57466de73677b00cf6f726e7b4c90",
"f82562c05aed50b10657378e012bdb4d68c94199",
"f92b5be2f69f9413be496987dee613eb52658f19",
"fa555e907ec23ef4b675d2b4ede6d53860914e95",
"fd7fcd8492af0d7b544821db98b2c6f63c335610"]
require 'rubygems'
require 'grit'
require 'pp'
packfile_index = ARGV[0]
pack = Grit::GitRuby::Internal::PackStorage.new(packfile_index)
pp pack.get_shas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment