Created
August 9, 2018 04:37
-
-
Save ehsahil/0455d872b24164574a3eb162dc78c062 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'socket' | |
require 'colorize' | |
begin | |
file = File.open(ARGV[0], "r") | |
rescue | |
puts "Usage: ruby git.rb objectsid" | |
exit | |
end | |
file.each_line do |objects| | |
puts | |
puts "Content of ObjectID --> #{objects}" | |
puts "+------------------------------------------------------------------------------------+" | |
puts | |
system("git cat-file -p #{objects}") | |
puts "Moving to next ObjectID" | |
puts | |
puts "+------------------------------------------------------------------------------------+" | |
puts | |
puts | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment