<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -13,17 +13,6 @@ module Grit
       self.git_dir = git_dir
     end
     
-    # Converstion hash from Ruby style options to git command line
-    # style options
-    TRANSFORM = {:max_count =&gt; &quot;--max-count=&quot;,
-                 :skip =&gt; &quot;--skip=&quot;,
-                 :pretty =&gt; &quot;--pretty=&quot;,
-                 :sort =&gt; &quot;--sort=&quot;,
-                 :format =&gt; &quot;--format=&quot;,
-                 :since =&gt; &quot;--since=&quot;,
-                 :p =&gt; &quot;-p&quot;,
-                 :s =&gt; &quot;-s&quot;}
-    
     # Run the given git command with the specified arguments and return
     # the result as a String
     #   +cmd+ is the command
@@ -52,12 +41,19 @@ module Grit
     def transform_options(options)
       args = []
       options.keys.each do |opt|
-        if TRANSFORM[opt]
+        if opt.to_s.size == 1
+          if options[opt] == true
+            args &lt;&lt; &quot;-#{opt}&quot;
+          else
+            val = options.delete(opt)
+            args &lt;&lt; &quot;-#{opt.to_s} #{val}&quot;
+          end
+        else
           if options[opt] == true
-            args &lt;&lt; TRANSFORM[opt]
+            args &lt;&lt; &quot;--#{opt.to_s.gsub(/_/, '-')}&quot;
           else
             val = options.delete(opt)
-            args &lt;&lt; TRANSFORM[opt] + val.to_s
+            args &lt;&lt; &quot;--#{opt.to_s.gsub(/_/, '-')}=#{val}&quot;
           end
         end
       end</diff>
      <filename>lib/grit/git.rb</filename>
    </modified>
    <modified>
      <diff>@@ -10,6 +10,12 @@ class TestGit &lt; Test::Unit::TestCase
   end
   
   def test_transform_options
+    assert_equal [&quot;-s&quot;], @git.transform_options({:s =&gt; true})
+    assert_equal [&quot;-s 5&quot;], @git.transform_options({:s =&gt; 5})
+    
+    assert_equal [&quot;--max-count&quot;], @git.transform_options({:max_count =&gt; true})
     assert_equal [&quot;--max-count=5&quot;], @git.transform_options({:max_count =&gt; 5})
+    
+    assert_equal [&quot;-t&quot;, &quot;-s&quot;], @git.transform_options({:s =&gt; true, :t =&gt; true})
   end
 end
\ No newline at end of file</diff>
      <filename>test/test_git.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>b5d4f15a4dd41646405f11fb107aa8efb16c98a4</id>
    </parent>
  </parents>
  <author>
    <name>Tom Preston-Werner</name>
    <email>tom@mojombo.com</email>
  </author>
  <url>http://github.com/mojombo/grit/commit/8c7f4e1d8cb66590825701b758160e3721003dde</url>
  <id>8c7f4e1d8cb66590825701b758160e3721003dde</id>
  <committed-date>2007-10-25T09:13:03-07:00</committed-date>
  <authored-date>2007-10-25T09:13:03-07:00</authored-date>
  <message>dynamically rewrite ruby style git options</message>
  <tree>acc8645713a107f3b755d6c721aa9e0a3fd658d9</tree>
  <committer>
    <name>Tom Preston-Werner</name>
    <email>tom@mojombo.com</email>
  </committer>
</commit>
