<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -34,13 +34,22 @@ Usage:
 
   Maybe look at it and edit it:
     $ gitbug
-    $ gitbug show .*first
+    -- Open bugs
+    444468c69994_This_is_my_first_bug       2009-02-16 15:39:18+0200
+
+    $ gitbug show .*first 
     $ gitbug edit .*first
 
-  You could also fix the bug:
+  Gitbug treats the pattern as a regexp prefixed by `^', so `.*first' 
+  means `^.*first'. Hence you can use the prefix of the hexadecimal part 
+  without the `.*', e.g. `gitbug show 4444`.
+
+  You should fix the bug:
     $ echo my great fix &gt;&gt; foo
 
   And then tell Gitbug what you did:
+    $ git commit -a -m 'foo: fixed bug, FIX[.*first]'
+  or
     $ git commit -a -m 'foo: fixed bug'
     $ gitbug close .*first
 </diff>
      <filename>README</filename>
    </modified>
    <modified>
      <diff>@@ -367,13 +367,14 @@ let use_autoclose _ =
       | &quot;#!/bin/sh&quot;::t -&gt; any (not @. xmatch &quot;^\\s*([:#].*|\\s*)$&quot;) t
       | _ -&gt; true in
   let post_commit = git_dir () ^/ &quot;hooks&quot; ^/ &quot;post-commit&quot; in
-  if not (fileExists post_commit) || edited post_commit
+  if fileExists post_commit &amp;&amp; edited post_commit
   then begin
     puts &quot;.git/hooks/post-commit has been edited&quot;;
     puts &quot;Please add the autoclose hook manually by calling:&quot;;
     puts (sprintf &quot;  %s autoclose;&quot; Sys.argv.(0));
     puts &quot;at the end of your post-commit hook.&quot;
   end else begin
+    if not (fileExists post_commit) then writeFile post_commit &quot;#!/bin/sh\n&quot;;
     appendFile post_commit (sprintf &quot;\n%s autoclose;\n&quot; Sys.argv.(0));
     chmod 0o755 post_commit
   end</diff>
      <filename>src/gitbug.ml</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>eec5797699b0fe42d30db8b4e606249d7f7f035d</id>
    </parent>
  </parents>
  <author>
    <name>Ilmari Heikkinen</name>
    <email>ilmari.heikkinen@gmail.com</email>
  </author>
  <url>http://github.com/kig/gitbug/commit/45bf4d789470344a9e70e317ffdee9ae5a04d21d</url>
  <id>45bf4d789470344a9e70e317ffdee9ae5a04d21d</id>
  <committed-date>2009-02-16T05:51:48-08:00</committed-date>
  <authored-date>2009-02-16T05:51:48-08:00</authored-date>
  <message>fixed use_autoclose when missing post_commit hook, added pattern explanation to README</message>
  <tree>c36e658b0cd3416a6382db0a5c99c4e0e8fd764d</tree>
  <committer>
    <name>Ilmari Heikkinen</name>
    <email>ilmari.heikkinen@gmail.com</email>
  </committer>
</commit>
