class Git::Worktree
A worktree in a Git
repository
Attributes
Public Class Methods
Source
# File lib/git/worktree.rb, line 10 def initialize(base, dir, gcommit = nil) @full = dir @full += " #{gcommit}" unless gcommit.nil? @base = base @dir = dir @gcommit = gcommit end
Public Instance Methods
Source
# File lib/git/worktree.rb, line 23 def add @base.lib.worktree_add(@dir, @gcommit) end
Source
# File lib/git/worktree.rb, line 18 def gcommit @gcommit ||= @base.gcommit(@full) @gcommit end