<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,5 +1,10 @@
 module StrokeDB
-  RAW_HEAD_VERSION_UUID         = Util.sha1_uuid(&quot;strokedb-internal:head-version&quot;).to_raw_uuid
+  
+  def self.head(branch=&quot;master&quot;)
+    Util.sha1_uuid(branch).to_raw_uuid
+  end
+  
+  RAW_MASTER_HEAD_VERSION_UUID         = head()
 
   class FileStorage &lt; Storage
 
@@ -14,7 +19,7 @@ module StrokeDB
 
     def find(uuid, version=nil, opts = {}, &amp;block)
       uuid_version = uuid + (version ? &quot;.#{version}&quot; : &quot;&quot;)
-      key = uuid.to_raw_uuid + (version ? version.to_raw_uuid : RAW_HEAD_VERSION_UUID)
+      key = uuid.to_raw_uuid + (version ? version.to_raw_uuid : RAW_MASTER_HEAD_VERSION_UUID)
       if (ptr = @uindex.find(key)) &amp;&amp; (ptr[0,20] != &quot;\x00&quot; * 20) # no way ptr will be zero
         raw_doc = StrokeDB::deserialize(read_at_ptr(ptr[0,20]))
         unless opts[:no_instantiation]
@@ -28,7 +33,7 @@ module StrokeDB
     end
 
     def include?(uuid,version=nil)
-      key = uuid.to_raw_uuid + (version ? version.to_raw_uuid : RAW_HEAD_VERSION_UUID)
+      key = uuid.to_raw_uuid + (version ? version.to_raw_uuid : RAW_MASTER_HEAD_VERSION_UUID)
       !@uindex.find(key).nil?
     end
     
@@ -47,7 +52,7 @@ module StrokeDB
       @uindex.each do |key, value|
         timestamp = StrokeDB.deserialize(read_at_ptr(value[20,20]))
         next if after &amp;&amp; (timestamp &lt;= after)
-        if key[16,16] == RAW_HEAD_VERSION_UUID || include_versions
+        if key[16,16] == RAW_MASTER_HEAD_VERSION_UUID || include_versions
           yield Document.from_raw(options[:store],StrokeDB.deserialize(read_at_ptr(value[0,20])))
         end
       end
@@ -59,7 +64,7 @@ module StrokeDB
       ts_ptr = DistributedPointer.pack(@archive.raw_uuid,ts_position)
       ptr = DistributedPointer.pack(@archive.raw_uuid,position)
       uuid = document.raw_uuid
-      @uindex.insert(uuid + RAW_HEAD_VERSION_UUID, ptr + ts_ptr) if options[:head] || !document.is_a?(VersionedDocument)
+      @uindex.insert(uuid + RAW_MASTER_HEAD_VERSION_UUID, ptr + ts_ptr) if options[:head] || !document.is_a?(VersionedDocument)
       @uindex.insert(uuid + document.version.to_raw_uuid, ptr + ts_ptr) unless options[:head]
     rescue ArchiveVolume::VolumeCapacityExceeded	 
       create_new_archive!</diff>
      <filename>lib/strokedb/stores/file_storage.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>6593374d1e4c1d19d6082565a102d60e6e129f28</id>
    </parent>
  </parents>
  <author>
    <name>Yurii Rashkovskii</name>
    <email>yrashk@idbns.com</email>
  </author>
  <url>http://github.com/yrashk/strokedb/commit/9894d45f5407283ecb19871d8fd56cdc305413df</url>
  <id>9894d45f5407283ecb19871d8fd56cdc305413df</id>
  <committed-date>2008-05-26T12:46:47-07:00</committed-date>
  <authored-date>2008-05-26T12:46:47-07:00</authored-date>
  <message>Minor master head naming improvement</message>
  <tree>af808244a05de70c465c3a2f2d66513aa1657e29</tree>
  <committer>
    <name>Yurii Rashkovskii</name>
    <email>yrashk@idbns.com</email>
  </committer>
</commit>
