<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,2 +1,2 @@
 #!/usr/bin/env ruby
-system &quot;rsync&quot;, &quot;-r&quot;, &quot;--perms&quot;, &quot;--times&quot;, &quot;--links&quot;, &quot;--specials&quot;, &quot;--devices&quot;, &quot;--owner&quot;, &quot;--group&quot;, ARGV[1] + &quot;/&quot;, ARGV[2]
+system &quot;rsync&quot;, &quot;-r&quot;, &quot;--perms&quot;, &quot;--times&quot;, &quot;--links&quot;, &quot;--hard-links&quot;, &quot;--specials&quot;, &quot;--devices&quot;, &quot;--owner&quot;, &quot;--group&quot;, ARGV[1] + &quot;/&quot;, ARGV[2]</diff>
      <filename>bin/mimeograph</filename>
    </modified>
    <modified>
      <diff>@@ -32,6 +32,15 @@ describe &quot;mimegraph create&quot; do
     destination.join(&quot;symlink&quot;).readlink.to_s.should == &quot;target&quot;
   end
 
+  it &quot;should preserve hardlinks&quot; do
+    source.join(&quot;file1&quot;).create
+    source.join(&quot;file2&quot;).make_link source.join(&quot;file1&quot;)
+
+    mimeograph(:create, source, destination).should be_successful
+
+    destination.join(&quot;file2&quot;).should be_hardlink_to(destination.join(&quot;file1&quot;))
+  end
+
   it &quot;should preserve special files&quot; do
     source.join(&quot;pipe&quot;).make_pipe
     mimeograph(:create, source, destination).should be_successful</diff>
      <filename>examples/mimeograph/create_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -33,4 +33,16 @@ describe Pathname do
     workspace.path.join(&quot;file2&quot;).create.change_group_id
     workspace.path.join(&quot;file2&quot;).stat.gid.should_not == workspace.path.join(&quot;file1&quot;).stat.gid
   end
+
+  it &quot;should be able to detect when not a hardlink&quot; do
+    workspace.path.join(&quot;file1&quot;).create
+    workspace.path.join(&quot;file2&quot;).create
+    workspace.path.join(&quot;file2&quot;).should_not be_hardlink_to(workspace.path.join(&quot;file1&quot;))
+  end
+
+  it &quot;should be able to detect when it is a hardlink&quot; do
+    workspace.path.join(&quot;file1&quot;).create
+    workspace.path.join(&quot;file2&quot;).make_link workspace.path.join(&quot;file1&quot;)
+    workspace.path.join(&quot;file2&quot;).should be_hardlink_to(workspace.path.join(&quot;file1&quot;))
+  end
 end</diff>
      <filename>examples/spec_rig/pathname_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -41,9 +41,7 @@ module SpecRig
 end
 
 Spec::Matchers.define :be_successful do 
-  match do |command|
-    command.successful?
-  end
+  match { |command| command.successful? }
 
   failure_message_for_should do |command|
     &quot;Expected #{command.inspect} to succeed, but failed with output:\n#{command.output}&quot;</diff>
      <filename>examples_lib/spec_rig/command.rb</filename>
    </modified>
    <modified>
      <diff>@@ -23,4 +23,12 @@ Pathname.class_eval do
     chown nil, new_gid
     self
   end
+
+  def hardlink_to?(target)
+    stat.ino == target.stat.ino    
+  end
+end
+
+Spec::Matchers.define :be_hardlink_to do |target|
+  match { |source| source.hardlink_to? target }
 end</diff>
      <filename>examples_lib/spec_rig/pathname.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>03bc2083e67fc142a6eb7e611cd1abfa42fc6bcb</id>
    </parent>
  </parents>
  <author>
    <name>qxjit (David Vollbracht)</name>
    <email>david.vollbracht@gmail.com</email>
  </author>
  <url>http://github.com/qxjit/mimeograph/commit/3ceb49cad3fb3ab9322d19f8c91367962e198726</url>
  <id>3ceb49cad3fb3ab9322d19f8c91367962e198726</id>
  <committed-date>2009-10-23T16:29:01-07:00</committed-date>
  <authored-date>2009-10-23T16:29:01-07:00</authored-date>
  <message>David: preserve hardlinks</message>
  <tree>31758d79bd7af1cc452c531d92387693a26542fa</tree>
  <committer>
    <name>qxjit (David Vollbracht)</name>
    <email>david.vollbracht@gmail.com</email>
  </committer>
</commit>
