Permalink
Browse files

can recover from not finding the closest commit

  • Loading branch information...
1 parent eeab1fa commit ac31ddf7fde24cec1d5ce3fd8fab074f0d61e67c @schacon committed May 30, 2008
Showing with 5 additions and 1 deletion.
  1. +1 −1 git-lighthouse.gemspec
  2. +4 −0 lib/git-lighthouse/base.rb
@@ -1,7 +1,7 @@
Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY
s.name = "git-lighthouse"
- s.version = "0.1.1"
+ s.version = "0.1.2"
s.date = "2008-05-27"
s.author = "Scott Chacon"
s.email = "schacon@gmail.com"
@@ -46,6 +46,10 @@ def ticket_checkout(tid, attId)
# last commit before this date
base_commit = @git.log(1).until(tic.created_at.to_s).first rescue nil
+ if !base_commit
+ base_commit = @git.log(1).first
+ end
+
puts "nearest commit: " + base_commit.sha
if base_commit

0 comments on commit ac31ddf

Please sign in to comment.