# ... and all the rest that could be moved out of bindir to gitexecdir
PROGRAMS = \
git-apply$X git-cat-file$X \
- git-checkout-index$X git-clone-pack$X git-commit-tree$X \
+ git-checkout-index$X git-clone-pack$X \
git-convert-objects$X git-diff-files$X \
git-diff-index$X git-diff-stages$X \
git-diff-tree$X git-fetch-pack$X git-fsck-objects$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-tar-tree$X git-read-tree$X
+ git-tar-tree$X git-read-tree$X git-commit-tree$X
# what 'all' will build and 'install' will install, in gitexecdir
ALL_PROGRAMS = $(PROGRAMS) $(SIMPLE_PROGRAMS) $(SCRIPTS)
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-tar-tree.o builtin-read-tree.o
+ builtin-tar-tree.o builtin-read-tree.o builtin-commit-tree.o
GITLIBS = $(LIB_FILE) $(XDIFF_LIB)
LIBS = $(GITLIBS) -lz
#include "cache.h"
#include "commit.h"
#include "tree.h"
+#include "builtin.h"
#define BLOCKING (1ul << 14)
return 1;
}
-int main(int argc, char **argv)
+int cmd_commit_tree(int argc, const char **argv, char **envp)
{
int i;
int parents = 0;
check_valid(tree_sha1, tree_type);
for (i = 2; i < argc; i += 2) {
- char *a, *b;
+ const char *a, *b;
a = argv[i]; b = argv[i+1];
if (!b || strcmp(a, "-p"))
usage(commit_tree_usage);
extern int cmd_ls_tree(int argc, const char **argv, char **envp);
extern int cmd_tar_tree(int argc, const char **argv, char **envp);
extern int cmd_read_tree(int argc, const char **argv, char **envp);
+extern int cmd_commit_tree(int argc, const char **argv, char **envp);
#endif
{ "ls-files", cmd_ls_files },
{ "ls-tree", cmd_ls_tree },
{ "tar-tree", cmd_tar_tree },
- { "read-tree", cmd_read_tree }
+ { "read-tree", cmd_read_tree },
+ { "commit-tree", cmd_commit_tree }
};
int i;