lib/braid/operations.rb in braid-1.0.4 vs lib/braid/operations.rb in braid-1.0.5
- old
+ new
@@ -275,10 +275,17 @@
def read_tree_prefix_i(treeish, prefix)
invoke(:read_tree, "--prefix=#{prefix}/ -i", treeish)
true
end
+ # Read tree into the root of the index. This may not be the preferred way
+ # to do it, but it seems to work.
+ def read_tree_im(treeish)
+ invoke(:read_tree, "-im", treeish)
+ true
+ end
+
# Write a tree object for the current index and return its ID.
def write_tree()
invoke(:write_tree)
end
@@ -295,9 +302,15 @@
end
end
def rm_r(path)
invoke(:rm, '-r', path)
+ true
+ end
+
+ # Remove from index only.
+ def rm_r_cached(path)
+ invoke(:rm, '-r', '--cached', path)
true
end
def tree_hash(path, treeish = 'HEAD')
out = invoke(:ls_tree, treeish, '-d', path)