<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -13,6 +13,7 @@ Iobuf: import bufio;
 	
 include &quot;utils.m&quot;;
 	utils: Utils;
+bytepos, sha2string, SHALEN: import utils;	
 	
 include &quot;cat-file.m&quot;;
 
@@ -36,14 +37,25 @@ init(repopath: string, typeonly: int, path: string, ch: chan of array of byte)
 catfile(path: string)
 {
 	(filetype, filesize, buf) := utils-&gt;readsha1file(path);	
-	offset := 0;
 
 	msgchan &lt;-= sys-&gt;aprint(&quot;filetype: %s\n&quot;, filetype);
 	if(printtypeonly){
 		msgchan &lt;-= nil;
 		return;
 	}
-	msgchan &lt;-= buf[offset:];
+	str := &quot;&quot;;
+	offset := 0;
+	while(filetype == &quot;tree&quot; &amp;&amp; (pos := bytepos(buf, offset, byte 0)) != -1){
+		pos++;
+		sha1 := buf[pos: pos + SHALEN];
+		str += string buf[offset: pos - 1];
+		str += &quot; &quot; + sha2string(sha1);
+		offset = pos + SHALEN;
+	}
+	if(filetype == &quot;tree&quot;)
+		msgchan &lt;-= sys-&gt;aprint(&quot;%s&quot;, str);
+	else
+		msgchan &lt;-= buf[:];
 }
 
 usage()</diff>
      <filename>cat-file.b</filename>
    </modified>
    <modified>
      <diff>@@ -39,19 +39,18 @@ init(args: list of string)
 	utils = load Utils Utils-&gt;PATH;
 
 	REPOPATH = hd args;
-	args = tl args;
+
 	utils-&gt;init(REPOPATH);
 	index = Index.new(REPOPATH);
 	stderr = sys-&gt;fildes(2);
-	if(!index.readindex(REPOPATH + INDEXPATH))
+	if(!index.readindex(INDEXPATH))
 	{
 		sys-&gt;fprint(stderr, &quot;index read error\n&quot;);
 		exit;
 	}
 	
 	arg-&gt;init(args);
-	while((c := arg-&gt;opt()) != 0)
-	{
+	while((c := arg-&gt;opt()) != 0){
 		case c
 		{
 			'a' =&gt; all = 1;
@@ -118,7 +117,10 @@ checkoutentry(fd: ref Sys-&gt;FD, entry: ref Entry)
 checkoutall()
 {
 	for(l := index.entries.all(); l != nil; l = tl l)
+	{
+		sys-&gt;print(&quot;checking out: %s\n&quot;, (hd l).name);
 		checkoutfile((hd l).name);
+	}
 }
 
 dirname(path: string): string
@@ -135,6 +137,7 @@ makedirs(path: string)
 	if(!exists(path))
 		makedirs(dirname(path));
 	sys-&gt;create(path, Sys-&gt;OREAD,  Sys-&gt;DMDIR|8r755);
+
 }
 
 exists(path: string): int</diff>
      <filename>checkout-index.b</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,7 @@
 
 Checkoutindex: module
 {
+	PATH: con &quot;/dis/git/checkout-index.dis&quot;;
 	init: fn(args: list of string);
 };
 </diff>
      <filename>checkout-index.m</filename>
    </modified>
    <modified>
      <diff>@@ -56,7 +56,7 @@ init(args: list of string)
 
 check()
 {
-	readrepo(OBJECTSTOREPATH);
+	readrepo(REPOPATH + OBJECTSTOREPATH);
 
 	cnt := 0;
 	for(i := 0; i &lt; HASHSZ; i++){</diff>
      <filename>checkrepo.b</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,6 @@
 Checkrepo: module
 {
+	PATH: con &quot;/dis/git/checkrepo.dis&quot;;
 	init: fn(args: list of string);
 };
 </diff>
      <filename>checkrepo.m</filename>
    </modified>
    <modified>
      <diff>@@ -58,33 +58,31 @@ init(args: list of string)
 	REPOPATH = hd args;
 	args = tl args;
 	
-	arg-&gt;init(args);
 	utils-&gt;init(REPOPATH);
 	deflate-&gt;init();
 
 	parents: list of string = nil;
-	sha := arg-&gt;arg();
 
-	while((c := arg-&gt;opt()) != 0)
-	{
-		case c
-		{
+	sha := hd args;
+		arg-&gt;init(args);
+
+	while((c := arg-&gt;opt()) != 0){
+		case c{
 
 			'p' =&gt; parents = arg-&gt;arg() :: parents;
 			 *  =&gt; usage(); return; 
 		}
 	}
 
-	commit(sha, parents);
+	commit(sha, parents, arg-&gt;argv());
 }
 
-commit(treesha: string, parents: list of string): string
+commit(treesha: string, parents: list of string, args: list of string): string
 {
 	if(!utils-&gt;exists(treesha)){
 		sys-&gt;fprint(stderr, &quot;no such tree file\n&quot;);
 		return &quot;&quot;;
 	}
-
 	for(l := parents; l != nil; l = tl l){
 		if(!utils-&gt;exists(hd l)){
 			sys-&gt;fprint(stderr, &quot;no such sha file: %s\n&quot;, hd l);
@@ -100,15 +98,34 @@ commit(treesha: string, parents: list of string): string
 	}
 	config: ref Strhash[ref Config];
 	config = utils-&gt;getuserinfo();
-	authorname := env-&gt;getenv(&quot;AUTHOR_NAME&quot;);
-	authoremail := env-&gt;getenv(&quot;AUTHOR_EMAIL&quot;);
-	authordate := env-&gt;getenv(&quot;AUTHOR_DATE&quot;);
+
+	authorname := hd args;
+	args = tl args;
+
+	authoremail := hd args;
+	args = tl args;
 	
-	if(authorname == &quot;&quot; || authoremail == &quot;&quot;){
-		(authorname, authoremail) = getpersoninfo(&quot;author&quot;);	
-	}
+	authordate := hd args;
+	args = tl args;
 
-	(comname, comemail) := getpersoninfo(&quot;committer&quot;);
+	comname := hd args;
+	args = tl args;
+	
+	comemail := hd args;
+	args = tl args;
+
+#	authorname := env-&gt;getenv(&quot;AUTHOR_NAME&quot;);
+#	authoremail := env-&gt;getenv(&quot;AUTHOR_EMAIL&quot;);
+#	authordate := env-&gt;getenv(&quot;AUTHOR_DATE&quot;);
+#	
+#	if(authorname == &quot;&quot; || authoremail == &quot;&quot;){
+#		(authorname, authoremail) = getpersoninfo(&quot;author&quot;);	
+#	}
+#
+#	(comname, comemail) := (config.find(&quot;user&quot;), config.find(&quot;email&quot;)););
+#	if(comname == &quot;&quot; || comemail == &quot;&quot;){
+#		(comname, comemail) = getpersoninfo(&quot;committer&quot;);
+#	}
 	date := daytime-&gt;time();
 
 	if(authordate == &quot;&quot;)
@@ -117,7 +134,12 @@ commit(treesha: string, parents: list of string): string
 	commitmsg += &quot;author &quot; + authorname + &quot; &lt;&quot; + authoremail + &quot;&gt; &quot; + authordate + &quot;\n&quot;;
 	commitmsg += &quot;committer &quot; + comname + &quot; &lt;&quot; + comemail + &quot;&gt; &quot; + date + &quot;\n\n&quot;;
 
-	commitmsg += getcomment();
+	while(args != nil){
+		commitmsg += hd args;
+		args = tl args;
+	}
+#	commitmsg += getcomment();
+
 
 	commitlen := int2string(len commitmsg);
 	#6 - &quot;commit&quot;, 1 - &quot; &quot;, 1 - '\0'
@@ -137,9 +159,13 @@ commit(treesha: string, parents: list of string): string
 	ch &lt;-= (0, buf);
 	(sz, sha) = &lt;-ch;
 
-	fd := sys-&gt;open(REPOPATH + &quot;head&quot;, Sys-&gt;OWRITE);
-	sys-&gt;fprint(fd, &quot;%s&quot;, treesha);
-	return sha2string(sha);
+	fd := sys-&gt;create(REPOPATH + &quot;head&quot;, Sys-&gt;OWRITE, 8r644);
+	
+	ret := sha2string(sha);
+
+	sys-&gt;fprint(fd, &quot;%s&quot;, ret);
+
+	return ret;
 }
 
 
@@ -149,6 +175,7 @@ getpersoninfo(pos: string): (string, string)
 	ibuf := bufio-&gt;fopen(sys-&gt;fildes(0), bufio-&gt;OREAD);
 	
 	sys-&gt;print(&quot;Enter %s's name: &quot;, pos);
+	buf := array[128] of byte;
 	name := readline(ibuf);	
 
 	sys-&gt;print(&quot;Enter %s's email: &quot;, pos);</diff>
      <filename>commit-tree.b</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,6 @@
 
 Committree: module
 {
+	PATH: con &quot;/dis/git/commit-tree.dis&quot;;
 	init: fn(args: list of string);
 };</diff>
      <filename>commit-tree.m</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,6 @@
 
 Difftree: module
 {
+	PATH: con &quot;/dis/git/diff-tree.dis&quot;;
 	init: fn(args: list of string);
 };</diff>
      <filename>diff-tree.m</filename>
    </modified>
    <modified>
      <diff>@@ -34,8 +34,12 @@ REPOPATH: string;
 
 Index.new(repopath: string): ref Index
 {
-	tables = load Tables Tables-&gt;PATH;
 	sys = load Sys Sys-&gt;PATH;
+	tables = load Tables Tables-&gt;PATH;
+	if(tables == nil){
+		sys-&gt;print(&quot;tables is nil: %r\n&quot;);
+	
+	}
 	utils = load Utils Utils-&gt;PATH;
 	keyring = load Keyring Keyring-&gt;PATH;
 	exclude = load Exclude Exclude-&gt;PATH;
@@ -155,7 +159,7 @@ Header.new(): ref Header
 #return: number of elements read from index file
 Index.readindex(index: self ref Index, path : string) : int
 {
-	indexfd := sys-&gt;open(path, Sys-&gt;OREAD);
+	indexfd := sys-&gt;open(REPOPATH + path, Sys-&gt;OREAD);
 
 	if(indexfd == nil){
 		sys-&gt;fprint(stderr,&quot;file access error: %r\n&quot;);
@@ -222,7 +226,7 @@ Index.readindex(index: self ref Index, path : string) : int
 #return: number of elements written to the index file
 Index.writeindex(index: self ref Index, path : string) : int
 {
-	fd := sys-&gt;create(path, Sys-&gt;OWRITE, 8r644);
+	fd := sys-&gt;create(REPOPATH + path, Sys-&gt;OWRITE, 8r644);
 	if(fd == nil){
 		sys-&gt;fprint(stderr, &quot;write index error: %r\n&quot;);
 		return 0;
@@ -254,8 +258,7 @@ Index.writeindex(index: self ref Index, path : string) : int
 		entrybuf = (hd l).unpack();
 
 		cnt := sys-&gt;write(fd, entrybuf, len entrybuf);
-		if(cnt != len entrybuf)
-		{
+		if(cnt != len entrybuf){
 			sys-&gt;print(&quot;couldn't write entry to the file: %r\n&quot;);
 			return cnt;
 		}
@@ -407,7 +410,7 @@ initentry(filename: string): ref Entry
 {
 	entry: Entry;
 
-	(retval, dirstat) := sys-&gt;stat(filename);
+	(retval, dirstat) := sys-&gt;stat(REPOPATH + filename);
 	if(retval != 0)
 	{
 		sys-&gt;fprint(stderr,&quot;stat error: %r\n&quot;);</diff>
      <filename>gitindex.b</filename>
    </modified>
    <modified>
      <diff>@@ -54,12 +54,15 @@ showlog(commits: list of string)
 	if(filetype != &quot;commit&quot;)
 		return showlog(commits);
 
+
 	msgchan &lt;-= sys-&gt;aprint(&quot;Commit: %s\n&quot;, sha1);
+
 	ibuf := bufio-&gt;aopen(buf);
 
 	#reading tree and throwing it away(maybe it can be used in the future).
 	ibuf.gets('\n');
 
+
 	while((s := ibuf.gets('\n')) != nil){
 		(t, parentsha1) := splitr(s, &quot; &quot;);
 		if(t != &quot;parent &quot;)</diff>
      <filename>log.b</filename>
    </modified>
    <modified>
      <diff>@@ -28,6 +28,9 @@ include &quot;cat-file.m&quot;;
 include &quot;readdir.m&quot;;
 	readdir: Readdir;
 
+include &quot;lists.m&quot;;
+	lists: Lists;
+
 include &quot;tables.m&quot;;
 	tables: Tables;
 Strhash: import tables;	
@@ -36,6 +39,23 @@ include &quot;init.m&quot;;
 	initmod: Initgit;
 
 include &quot;update-index.m&quot;;
+	indexmod: Updateindex;
+
+include &quot;write-tree.m&quot;;
+
+include &quot;read-tree.m&quot;;
+
+include &quot;show-diff.m&quot;;
+
+include &quot;diff-tree.m&quot;;
+
+include &quot;commit-tree.m&quot;;
+
+include &quot;checkrepo.m&quot;;
+
+include &quot;checkout-index.m&quot;;
+
+include &quot;workdir.m&quot;;
 
 repopath: string;
  
@@ -67,18 +87,20 @@ init(nil: ref Draw-&gt;Context, args: list of string)
 {
 	sys = load Sys Sys-&gt;PATH;
 	daytime = load Daytime Daytime-&gt;PATH;
+	lists = load Lists Lists-&gt;PATH;
 	tables = load Tables Tables-&gt;PATH;
 	stringmod = load String String-&gt;PATH;
 	log = load Log Log-&gt;PATH;
 	catfile = load Catfile Catfile-&gt;PATH;
 	readdir = load Readdir Readdir-&gt;PATH;
 	initmod = load Initgit Initgit-&gt;PATH;
+	indexmod = load Updateindex Updateindex-&gt;PATH;
 	
 	if(len args != 2)
 		usage();
 	
 
-	REPOPATH = hd (tl args);
+	REPOPATH = makeabsolute(hd (tl args));
 	repopath = REPOPATH;
 	if(REPOPATH[len REPOPATH - 1] != '/'){
 		REPOPATH += &quot;/&quot;;
@@ -235,6 +257,7 @@ mainloop:
 					item1 := table.find(string fid.path);
 					item2 := table.find(string item1.parentqid);
 
+					sys-&gt;print(&quot;myfs: reading file under objects\n&quot;);
 					#if objects is git object;FIXME: should be added code for checking zlib header
 					if(item2 != nil &amp;&amp; item2.parentqid == big QRootObjects){
 						path := item2.dirstat.name + item1.dirstat.name;
@@ -281,27 +304,56 @@ ctl(m: ref Tmsg.Write)
 	if(s != nil)
 		s = s[1:];
 
+	 args: list of string = nil;
+	 elem: string;
+	 while(s != &quot;&quot;){
+		 (elem, s) = stringmod-&gt;splitl(s, &quot; &quot;);
+		 sys-&gt;print(&quot;==&gt;%s\n&quot;, elem);
+		 args = elem :: args;
+		 if(s != nil)
+			 s = s[1:];
+	 }
+	args = lists-&gt;reverse(args);
 	case command{
 		&quot;init&quot; =&gt; sys-&gt;print(&quot;init\n&quot;);
-			initmod := load Initgit &quot;/dis/git/init.dis&quot;;
-			 if(initmod == nil){
-				sys-&gt;print(&quot;initmod load failed: %r\n&quot;);
-			}
 			 spawn initmod-&gt;init(REPOPATH :: nil);
 
 		&quot;add&quot; =&gt; sys-&gt;print(&quot;add\n&quot;);		
-			 indexmod := load Updateindex Updateindex-&gt;PATH;
-			 l: list of string = nil;
-			 elem: string;
-			 while(s != &quot;&quot;){
-				 (elem, s) = stringmod-&gt;splitl(s, &quot; &quot;);
-				 l = elem :: l;
-				 if(s != nil)
-					 s = s[1:];
-			 }
-			 spawn indexmod-&gt;init(REPOPATH :: &quot;-a&quot; ::l);
+			 spawn indexmod-&gt;init(REPOPATH :: &quot;-a&quot; ::args);
+
+		&quot;print&quot; =&gt; sys-&gt;print(&quot;print\n&quot;);
+			spawn indexmod-&gt;init(REPOPATH :: nil);
 
 		&quot;remove&quot; =&gt; sys-&gt;print(&quot;remove\n&quot;);
+			spawn indexmod-&gt;init(REPOPATH :: &quot;-r&quot; :: args);
+		
+		&quot;show-diff&quot; =&gt; sys-&gt;print(&quot;show-diff\n&quot;);
+			showdiff := load Showdiff Showdiff-&gt;PATH;
+			spawn showdiff-&gt;init(REPOPATH :: nil);
+		
+		&quot;write-tree&quot; =&gt; sys-&gt;print(&quot;write-tree\n&quot;);
+			writetree := load Writetree Writetree-&gt;PATH;
+			spawn writetree-&gt;init(REPOPATH :: nil); 
+
+		&quot;read-tree&quot; =&gt; sys-&gt;print(&quot;read-tree\n&quot;);
+			readtree := load Readtree Readtree-&gt;PATH;
+			readtree-&gt;init(REPOPATH :: args);
+
+		&quot;checkrepo&quot; =&gt; sys-&gt;print(&quot;checkrepo\n&quot;);
+			checkrepo := load Checkrepo Checkrepo-&gt;PATH;
+			checkrepo-&gt;init(REPOPATH :: args);
+
+		&quot;checkoutindex&quot; =&gt; sys-&gt;print(&quot;checkoutindex\n&quot;);
+			checkoutindex := load Checkoutindex Checkoutindex-&gt;PATH;
+			checkoutindex-&gt;init(REPOPATH :: args);
+
+		&quot;diff-tree&quot; =&gt; sys-&gt;print(&quot;diff-tree\n&quot;);
+			difftree := load Difftree Difftree-&gt;PATH;
+			difftree-&gt;init(REPOPATH :: args);
+
+		&quot;commit&quot; =&gt; sys-&gt;print(&quot;commit\n&quot;);
+			committree := load Committree Committree-&gt;PATH;
+			committree-&gt;init(REPOPATH :: args);
 		* =&gt; sys-&gt;print(&quot;default\n&quot;);
 	}
 }
@@ -403,3 +455,19 @@ usage()
 	sys-&gt;fprint(sys-&gt;fildes(2), &quot;mount {myfs dir} mntpt&quot;);
 	exit;
 }
+
+makeabsolute(path: string): string
+{
+	if(path == &quot;&quot; || path[0] == '/') return path;
+	
+	gwd := load Workdir Workdir-&gt;PATH;
+	pwd := gwd-&gt;init();
+
+	if(path[0] == '.'){
+		if(len path &lt;= 2)
+			return pwd;
+		return pwd + path[2:];
+	}
+
+	return pwd + &quot;/&quot; + path;
+}</diff>
      <filename>myfs.b</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,7 @@
 
 Readtree: module
 {
+	PATH: con &quot;/dis/git/read-tree.dis&quot;;
 	init: fn(args: list of string);
 };
 </diff>
      <filename>read-tree.m</filename>
    </modified>
    <modified>
      <diff>@@ -42,7 +42,7 @@ init(args: list of string)
 	REPOPATH = hd args;
 	utils-&gt;init(REPOPATH);
 	index = Index.new(REPOPATH);
-	index.readindex(REPOPATH + utils-&gt;INDEXPATH);
+	index.readindex(utils-&gt;INDEXPATH);
 	stderr = sys-&gt;fildes(2);
 	showdiffs();
 }
@@ -60,7 +60,7 @@ showdiffs()
 filechanged(entry: ref Entry): int
 {
 	sys-&gt;print(&quot;name is: %s\n&quot;, entry.name);
-	(ret, dirstat) := sys-&gt;stat(entry.name);
+	(ret, dirstat) := sys-&gt;stat(REPOPATH + entry.name);
 	if(ret == -1){
 		sys-&gt;fprint(stderr, &quot;File stat failed: %r\n&quot;);
 		return 0;
@@ -75,5 +75,5 @@ showdiff(entry: ref Entry)
 {
 	#loads acme-sac diff
 	diff = load Command &quot;/dis/git/acdiff.dis&quot;;
-	diff-&gt;init(nil, list of {&quot;diff&quot;, &quot;-u&quot;,utils-&gt;extractfile(utils-&gt;sha2string(entry.sha1)), entry.name});
+	diff-&gt;init(nil, list of {&quot;diff&quot;, &quot;-u&quot;,utils-&gt;extractfile(utils-&gt;sha2string(entry.sha1)), REPOPATH + entry.name});
 }</diff>
      <filename>show-diff.b</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,6 @@
 Showdiff: module
 {
+	PATH: con &quot;/dis/git/show-diff.dis&quot;;
 	init: fn(args: list of string);
 };
 </diff>
      <filename>show-diff.m</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,5 @@
 Tables: module {
-	PATH: con &quot;tables.dis&quot;;
+	PATH: con &quot;/dis/git/tables.dis&quot;;
 	Table: adt[T] {
 		items:	array of list of (int, T);
 		nilval:	T;</diff>
      <filename>tables.m</filename>
    </modified>
    <modified>
      <diff>@@ -38,6 +38,9 @@ init(args: list of string)
 {
 	sys = load Sys Sys-&gt;PATH;
 	gitindex = load Gitindex Gitindex-&gt;PATH;
+	if(gitindex == nil){
+		sys-&gt;print(&quot;gitindex is nil %r\n&quot;);
+	}
 	tables = load Tables Tables-&gt;PATH;
 	readdir = load Readdir Readdir-&gt;PATH;
 	
@@ -45,7 +48,7 @@ init(args: list of string)
 	stderr = sys-&gt;fildes(2);
 	sys-&gt;create(REPOPATH + &quot;index.lock&quot;, Sys-&gt;OWRITE | Sys-&gt;OEXCL, Sys-&gt;DMEXCL | 8r644);
 	index = Index.new(REPOPATH);
-	cnt := index.readindex(REPOPATH + INDEXPATH);
+	cnt := index.readindex(INDEXPATH);
 	if(cnt &lt; 0)
 		return;
 
@@ -57,7 +60,6 @@ init(args: list of string)
 			addfile(hd args);
 			args = tl args;
 		}
-
 	}
 	else if(args != nil &amp;&amp; hd args == &quot;-r&quot;){
 		args = tl args;
@@ -70,7 +72,7 @@ init(args: list of string)
 
 	printindex(index);
 	sys-&gt;print(&quot;Writing to index\n&quot;);
-	index.writeindex(REPOPATH + &quot;index.lock&quot;);
+	index.writeindex(&quot;index.lock&quot;);
 
 	#renaming index.lock to index
 	dirstat := sys-&gt;nulldir;
@@ -86,21 +88,20 @@ printindex(index: ref Index)
 {
 	table := index.entries;
 	if(table == nil) sys-&gt;print(&quot;its nill\n&quot;);
-	for( l := table.all(); l != nil; l = tl l)
-	{
-		sys-&gt;print(&quot;Name: %s\n&quot;, (hd l).name);
-		sys-&gt;print(&quot;Length: %bd\n&quot;, (hd l).length);
+	for(l := table.all(); l != nil; l = tl l){
+		sys-&gt;print(&quot;Name:%s\n&quot;, (hd l).name);
+		sys-&gt;print(&quot;Length:%bd\n&quot;, (hd l).length);
 	}
 }
 
 addfile(path: string)
 {
-	(ret, dirstat) := sys-&gt;stat(path);
+	(ret, dirstat) := sys-&gt;stat(REPOPATH + path);
 	if(ret == -1)
 		sys-&gt;fprint(stderr, &quot;%s does not exist\n&quot;, path);
 	if(dirstat.mode &amp; Sys-&gt;DMDIR)
 	{
-		(dirs,cnt)  := readdir-&gt;init(path,Readdir-&gt;NAME);
+		(dirs,cnt)  := readdir-&gt;init(REPOPATH + path,Readdir-&gt;NAME);
 		if(path[len path - 1] != '/')
 			path += &quot;/&quot;;
 </diff>
      <filename>update-index.b</filename>
    </modified>
    <modified>
      <diff>@@ -361,3 +361,12 @@ isdir(mode: int): int
 {
 	return mode &amp; 16384;
 }
+
+bytepos(a: array of byte, offset: int, delim: byte): int
+{
+	for(i := offset; i &lt; len a; i++){
+		if(a[i] == delim)
+			return i;
+	}
+	return -1;
+}</diff>
      <filename>utils.b</filename>
    </modified>
    <modified>
      <diff>@@ -51,6 +51,7 @@ Utils: module
 	warn: 	       fn(s: string);
 
 	isdir:         fn(mode: int): int;
+	bytepos:       fn(a: array of byte, offset: int, delim: byte): int; 
 
 };
 </diff>
      <filename>utils.m</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,6 @@
 Writetree: module
 {
+	PATH: con &quot;/dis/git/write-tree.dis&quot;;
 	init: fn(args: list of string);
 };
 </diff>
      <filename>write-tree.m</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>228807b282ba5c36bcdd44ed085907e6bb14eb37</id>
    </parent>
  </parents>
  <author>
    <name>Manzur</name>
    <email>manzur@UCB.(none)</email>
  </author>
  <url>http://github.com/manzur/gitfs/commit/f505ff91eec342b34604853e87a6d217db9f6112</url>
  <id>f505ff91eec342b34604853e87a6d217db9f6112</id>
  <committed-date>2009-06-25T12:22:44-07:00</committed-date>
  <authored-date>2009-06-25T12:22:44-07:00</authored-date>
  <message>- Added special case to cat for reading trees: sha of the files are showed as text.
- Fixed bug in checkout-index: path didn't included REPOPATH.
- Added interface between filesytem and checkrepo, checkoutindex, commit-tree, show-diff, read-tree, write-tree, diff-tree</message>
  <tree>35b865e6f5f9dcb4c2d885730e4f566941317258</tree>
  <committer>
    <name>Manzur</name>
    <email>manzur@UCB.(none)</email>
  </committer>
</commit>
