anchor.diff:      os:cmd("rm -rf "++ Tempdir)
     end,
     [
  -    {with, [fun test_put_raw_object/1]}
  +     {with, [fun test_put_raw_object/1]}
       ,{with, [fun test_make_tree/1]}
  +    ,{with, [fun test_make_new_dir/1]}
       ,{with, [fun test_raw_commit_files/1]}
       ,{with, [fun test_commit_files/1]}
     ]
  
positive.code:   end, {ok, Git3,OldTreeSha}, Files),
  
    {ok, #git{refs = Refs1, path = Path} = Git5, CommitSha} = put_raw_commit(Git4, ParentCommit, NewTreeSha, Options),
    Git6 = Git5#git{refs = lists:keystore(Head, 1, Refs1, {Head, CommitSha})},
    RefPath = filename:join([Path, "refs/heads", Head]),
    filelib:ensure_dir(RefPath),
    file:write_file(RefPath, CommitSha),
    {ok, Git6}.
  
  
  
  
negative.code:   {ok, Git2, NewTreeSha}.
  
  
  walk_tree(Git, undefined) ->
    {ok, Git, []};
  walk_tree(Git, SHA1) ->
    {ok, Git2, tree, Tree} = read_object(Git, SHA1), {ok, Git2, Tree}.
  
  
  walk_down_tree(Git1, OldTreeSha, [Path], Mode, BlobSha) ->
    {ok, Git2, OldTree} = walk_tree(Git1, OldTreeSha),
    NewTree = lists:keystore(Path, 1, OldTree, {Path, Mode, BlobSha}),
    {ok, Git3, NewTreeSha} = put_raw_object(Git2, tree, write_tree(NewTree)),
    {ok, Git3, NewTreeSha};
  
  walk_down_tree(Git1, OldTreeSha, [Path|Parts], Mode, BlobSha) ->
    {ok, Git2, OldTree} = walk_tree(Git1, OldTreeSha),
    NextSha = case lists:keyfind(Path, 1, OldTree) of
      {Path, <<"40000">>, NextSha_} ->
        NextSha_;
      {Path, BadMode, _} ->
        throw({cant_add,Path, BadMode, Parts});
      false ->
        undefined
    end,
    {ok, Git3, NewSha} = walk_down_tree(Git2, NextSha, Parts, Mode, BlobSha),
    NewTree = lists:keystore(Path, 1, OldTree, {Path, <<"40000">>, NewSha}),
    {ok, Git4, NewTreeSha} = put_raw_object(Git3, tree, write_tree(NewTree)),
    {ok, Git4, NewTreeSha}.
  
  
  
  to_b(List) when is_list(List) -> list_to_binary(List);
  to_b(Binary) when is_binary(Binary) -> Binary;
  