Sha256: 2c91011bfb6c0c0c08caa47fc7605b86d91e747ba4acb0cfaaaa324f526817ee
Contents?: true
Size: 564 Bytes
Versions: 33
Compression:
Stored size: 564 Bytes
Contents
require 'git/path' module Git class Worktree < Path attr_accessor :full, :dir, :gcommit def initialize(base, dir, gcommit = nil) @full = dir @full += ' ' + gcommit if !gcommit.nil? @base = base @dir = dir @gcommit = gcommit end def gcommit @gcommit ||= @base.gcommit(@full) @gcommit end def add @base.lib.worktree_add(@dir, @gcommit) end def remove @base.lib.worktree_remove(@dir) end def to_a [@full] end def to_s @full end end end
Version data entries
33 entries across 33 versions & 3 rubygems