git.lirion.de

Of git, get, and gud

aboutsummaryrefslogtreecommitdiffstats
path: root/.waterfox
ModeNameSize
d---------native-messaging-hosts126logstatsplain
d='n8' href='#n8'>8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
begin
  require 'rugged'
rescue LoadError => e
  t = Time.new
  puts t.to_i
else

  environmentpath = ARGV[0]
  environment     = ARGV[1]

  repo = Rugged::Repository.discover(File.join(environmentpath, environment))
  head  = repo.head

  #sha1 hash of the newest commit
  head_sha = head.target_id

  #the commit message associated the newest commit
  commit = repo.lookup(head_sha)

  #add something to find the remote url

  puts head_sha 
end