summaryrefslogtreecommitdiff
path: root/tool/vcs.rb
diff options
context:
space:
mode:
Diffstat (limited to 'tool/vcs.rb')
-rw-r--r--tool/vcs.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/tool/vcs.rb b/tool/vcs.rb
index 3451e226da..ba8be9044a 100644
--- a/tool/vcs.rb
+++ b/tool/vcs.rb
@@ -360,6 +360,14 @@ class VCS
[last, changed, modified, branch, title]
end
+ def initialize(*)
+ super
+ if srcdir = @srcdir and self.class.local_path?(srcdir)
+ @srcdir = File.realpath(srcdir)
+ end
+ self
+ end
+
def cmd_pipe(*cmds, &block)
self.class.cmd_pipe_at(@srcdir, cmds, &block)
end