Code

Merge branch 'rs/tar-tree' into next
authorJunio C Hamano <junkio@cox.net>
Sun, 26 Mar 2006 01:43:22 +0000 (17:43 -0800)
committerJunio C Hamano <junkio@cox.net>
Sun, 26 Mar 2006 01:43:22 +0000 (17:43 -0800)
* rs/tar-tree:
  tar-tree: Use the prefix field of a tar header
  tar-tree: Remove obsolete code
  tar-tree: Use write_entry() to write the archive contents
  tar-tree: Introduce write_entry()
  tar-tree: Use SHA1 of root tree for the basedir
  git-apply: safety fixes
  Removed bogus "<snap>" identifier.
  Clarify and expand some hook documentation.
  commit-tree: check return value from write_sha1_file()
  send-email: Identify author at the top when sending e-mail
  Format tweaks for asciidoc.

1  2 
tar-tree.c

diff --cc tar-tree.c
index 92035f51d84559478033fe6c801ea18c019360b8,efab2b5420af5225a0ebb4dbecd37252ed7ef1ff..8d9e31c20612f09f641a53b7876591b744eb0cea
@@@ -375,12 -304,16 +304,17 @@@ static void traverse_tree(struct tree_d
  
  int main(int argc, char **argv)
  {
-       unsigned char sha1[20];
+       unsigned char sha1[20], tree_sha1[20];
        struct commit *commit;
        struct tree_desc tree;
+       struct strbuf current_path;
+       current_path.buf = xmalloc(PATH_MAX);
+       current_path.alloc = PATH_MAX;
+       current_path.len = current_path.eof = 0;
  
        setup_git_directory();
 +      git_config(git_default_config);
  
        switch (argc) {
        case 3: