git-receive-pack$X git-rev-parse$X \
git-send-pack$X git-show-branch$X git-shell$X \
git-show-index$X git-ssh-fetch$X \
- git-ssh-upload$X git-tar-tree$X git-unpack-file$X \
+ git-ssh-upload$X git-unpack-file$X \
git-unpack-objects$X git-update-index$X git-update-server-info$X \
git-upload-pack$X git-verify-pack$X git-write-tree$X \
git-update-ref$X git-symbolic-ref$X \
BUILT_INS = git-log$X git-whatchanged$X git-show$X \
git-count-objects$X git-diff$X git-push$X \
git-grep$X git-rev-list$X git-check-ref-format$X \
- git-init-db$X git-ls-files$X git-ls-tree$X
+ git-init-db$X git-ls-files$X git-ls-tree$X \
+ git-tar-tree$X
# what 'all' will build and 'install' will install, in gitexecdir
ALL_PROGRAMS = $(PROGRAMS) $(SIMPLE_PROGRAMS) $(SCRIPTS)
BUILTIN_OBJS = \
builtin-log.o builtin-help.o builtin-count.o builtin-diff.o builtin-push.o \
builtin-grep.o builtin-rev-list.o builtin-check-ref-format.o \
- builtin-init-db.o builtin-ls-files.o builtin-ls-tree.o
+ builtin-init-db.o builtin-ls-files.o builtin-ls-tree.o \
+ builtin-tar-tree.o
GITLIBS = $(LIB_FILE) $(XDIFF_LIB)
LIBS = $(GITLIBS) -lz
#include "commit.h"
#include "strbuf.h"
#include "tar.h"
+#include "builtin.h"
#define RECORDSIZE (512)
#define BLOCKSIZE (RECORDSIZE * 20)
}
}
-int main(int argc, char **argv)
+int cmd_tar_tree(int argc, const char **argv, char** envp)
{
unsigned char sha1[20], tree_sha1[20];
struct commit *commit;
extern int cmd_init_db(int argc, const char **argv, char **envp);
extern int cmd_ls_files(int argc, const char **argv, char **envp);
extern int cmd_ls_tree(int argc, const char **argv, char **envp);
+extern int cmd_tar_tree(int argc, const char **argv, char **envp);
#endif
{ "init-db", cmd_init_db },
{ "check-ref-format", cmd_check_ref_format },
{ "ls-files", cmd_ls_files },
- { "ls-tree", cmd_ls_tree }
+ { "ls-tree", cmd_ls_tree },
+ { "tar-tree", cmd_tar_tree }
};
int i;