Deprecate requiring Git

This commit is contained in:
Ben Ogle 2014-09-22 11:01:14 -07:00
parent 9eed8a206a
commit c62b7cc710

View File

@ -1,12 +1,17 @@
{Point, Range} = require 'text-buffer'
{deprecate} = require 'grim'
module.exports =
BufferedNodeProcess: require '../src/buffered-node-process'
BufferedProcess: require '../src/buffered-process'
Git: require '../src/git'
GitRepository: require '../src/git'
Point: Point
Range: Range
Object.defineProperty module.exports, 'Git', get: ->
deprecate "Please require `GitRepository` instead of `Git`: `{Git} = require 'atom'`"
module.exports.GitRepository
# The following classes can't be used from a Task handler and should therefore
# only be exported when not running as a child node process
unless process.env.ATOM_SHELL_INTERNAL_RUN_AS_NODE