lib/obst/git_log.rb in obst-0.1.7 vs lib/obst/git_log.rb in obst-0.1.8
- old
+ new
@@ -5,10 +5,11 @@
def initialize(**opts)
path = opts[:C] || '.'
@cmd = ['git', '-C', path, 'log', '--name-status', '--pretty=format:%ad', "--date=format:'%Y-%m-%dT%H:%M:%S'"]
@cmd << '--after' << opts[:after] if opts[:after]
@cmd << '--before' << opts[:before] if opts[:before]
+ Array(opts[:pathspec]).each{ |s| @cmd << s }
end
def to_s
`#{@cmd.join(' ')}`
end
@@ -56,9 +57,12 @@
batch.clear
end
raise 'fail to loop git log' unless status_thread.value.success?
end
y << Commit.new(batch)
+ rescue => e
+ puts @cmd
+ raise e
end
end
end
end