#include "cache.h"
#include "quote.h"
#include "tree.h"
+#include "exec_cmd.h"
static struct treeent {
unsigned mode;
write_sha1_file(buf.buf, buf.len, tree_type, sha1);
}
-static const char mktree_usage[] = "git-mktree [-z]";
+static const char mktree_usage[] = "git mktree [-z]";
int main(int ac, char **av)
{
- struct strbuf sb;
- struct strbuf p_uq;
+ struct strbuf sb = STRBUF_INIT;
+ struct strbuf p_uq = STRBUF_INIT;
unsigned char sha1[20];
int line_termination = '\n';
+ git_extract_argv0_path(av[0]);
+
setup_git_directory();
while ((1 < ac) && av[1][0] == '-') {
av++;
}
- strbuf_init(&sb, 0);
- strbuf_init(&p_uq, 0);
while (strbuf_getline(&sb, stdin, line_termination) != EOF) {
char *ptr, *ntr;
unsigned mode;