2007-10-25 20:23:01 +04:00
|
|
|
$:.unshift File.dirname(__FILE__) # For use/testing when no gem is installed
|
2007-10-10 10:18:20 +04:00
|
|
|
|
|
|
|
# core
|
2008-01-20 00:35:57 +03:00
|
|
|
require 'fileutils'
|
2008-03-26 07:32:29 +03:00
|
|
|
require 'time'
|
2007-10-10 10:18:20 +04:00
|
|
|
|
|
|
|
# stdlib
|
2008-03-31 03:31:20 +04:00
|
|
|
require 'timeout'
|
2008-06-28 06:07:29 +04:00
|
|
|
require 'logger'
|
2008-10-24 02:12:43 +04:00
|
|
|
|
|
|
|
require 'open3_detach'
|
2007-10-10 10:18:20 +04:00
|
|
|
|
2008-01-07 05:59:51 +03:00
|
|
|
# third party
|
|
|
|
require 'rubygems'
|
|
|
|
require 'mime/types'
|
2008-04-19 03:27:08 +04:00
|
|
|
require 'digest/sha1'
|
2008-01-07 05:59:51 +03:00
|
|
|
|
2007-10-10 10:18:20 +04:00
|
|
|
# internal requires
|
2007-10-13 13:20:41 +04:00
|
|
|
require 'grit/lazy'
|
2007-10-10 11:06:12 +04:00
|
|
|
require 'grit/errors'
|
2008-04-19 03:27:08 +04:00
|
|
|
require 'grit/git-ruby'
|
2007-10-10 20:05:03 +04:00
|
|
|
require 'grit/git'
|
2008-04-25 00:39:08 +04:00
|
|
|
require 'grit/ref'
|
2007-10-10 11:50:39 +04:00
|
|
|
require 'grit/commit'
|
2008-06-20 02:36:35 +04:00
|
|
|
require 'grit/commit_stats'
|
2007-10-13 14:37:12 +04:00
|
|
|
require 'grit/tree'
|
2007-10-14 03:10:05 +04:00
|
|
|
require 'grit/blob'
|
2007-10-25 08:29:16 +04:00
|
|
|
require 'grit/actor'
|
2007-10-29 10:16:38 +03:00
|
|
|
require 'grit/diff'
|
2008-03-07 03:22:10 +03:00
|
|
|
require 'grit/config'
|
2007-10-10 20:05:03 +04:00
|
|
|
require 'grit/repo'
|
2008-05-01 09:03:18 +04:00
|
|
|
require 'grit/index'
|
2008-05-29 22:33:09 +04:00
|
|
|
require 'grit/status'
|
2008-08-29 12:18:03 +04:00
|
|
|
require 'grit/submodule'
|
2007-10-10 10:18:20 +04:00
|
|
|
|
2008-04-19 03:27:08 +04:00
|
|
|
|
2007-10-10 20:05:03 +04:00
|
|
|
module Grit
|
2008-06-28 06:22:41 +04:00
|
|
|
|
2007-10-20 10:08:03 +04:00
|
|
|
class << self
|
2008-06-28 06:22:41 +04:00
|
|
|
# Set +debug+ to true to log all git calls and responses
|
2007-10-20 10:08:03 +04:00
|
|
|
attr_accessor :debug
|
2008-05-29 21:29:59 +04:00
|
|
|
attr_accessor :use_git_ruby
|
2008-06-28 06:22:41 +04:00
|
|
|
# The standard +logger+ for debugging git calls - this defaults to a plain STDOUT logger
|
2008-06-28 06:07:29 +04:00
|
|
|
attr_accessor :logger
|
|
|
|
def log(str)
|
|
|
|
logger.debug { str }
|
|
|
|
end
|
2007-10-20 10:08:03 +04:00
|
|
|
end
|
|
|
|
self.debug = false
|
2008-05-29 21:29:59 +04:00
|
|
|
self.use_git_ruby = true
|
2007-10-20 10:08:03 +04:00
|
|
|
|
2008-06-28 06:07:29 +04:00
|
|
|
@logger ||= ::Logger.new(STDOUT)
|
2007-10-20 10:08:03 +04:00
|
|
|
|
2008-07-31 21:50:44 +04:00
|
|
|
VERSION = '0.9.1'
|
2007-10-29 15:20:10 +03:00
|
|
|
end
|