Permalink
Browse files

A few tweaks to git support.

  • Loading branch information...
1 parent 708e0da commit 7d815cd1c4faf081b710d1f6ead5fb324bcc2fb6 Paul Watson committed Mar 18, 2008
Showing with 4 additions and 2 deletions.
  1. +1 −1 bin/piston
  2. +2 −0 lib/piston/git/commit.rb
  3. +1 −1 lib/piston/working_copy.rb
View
2 bin/piston 100755 → 100644
@@ -1,4 +1,4 @@
-#!/usr/bin/env ruby
+#! /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
require "piston"
# Chain to the real command-line client
@@ -31,11 +31,13 @@ def each
@dir.find do |path|
Find.prune if path.to_s =~ %r{/[.]git}
next if @dir == path
+ next if File.directory?(path)
yield path.relative_path_from(@dir)
end
end
def copy_to(relpath, abspath)
+ Pathname.new(abspath).dirname.mkpath rescue nil
FileUtils.cp(@dir + relpath, abspath)
end
end
@@ -12,7 +12,7 @@ def logger
end
def guess(path)
- path = path.kind_of?(Pathname) ? path : Pathname.new(path)
+ path = path.kind_of?(Pathname) ? path : Pathname.new(path.to_s)
logger.debug {"Guessing the working copy type of #{path.inspect}"}
handler = handlers.detect do |handler|
logger.debug {"Asking #{handler.name} if it understands #{path}"}

0 comments on commit 7d815cd

Please sign in to comment.