From 53228a5fb8e80f87803e4a3ba8ed25b70fb4871d Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sat, 26 Nov 2005 00:50:02 -0800 Subject: Make the rest of commands work from a subdirectory. These commands are converted to run from a subdirectory. commit-tree convert-objects merge-base merge-index mktag pack-objects pack-redundant prune-packed read-tree tar-tree unpack-file unpack-objects update-server-info write-tree Signed-off-by: Junio C Hamano --- write-tree.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'write-tree.c') diff --git a/write-tree.c b/write-tree.c index 2b2c6b77a..0aac32f22 100644 --- a/write-tree.c +++ b/write-tree.c @@ -86,9 +86,12 @@ static int write_tree(struct cache_entry **cachep, int maxentries, const char *b int main(int argc, char **argv) { int i, funny; - int entries = read_cache(); + int entries; unsigned char sha1[20]; + setup_git_directory(); + + entries = read_cache(); if (argc == 2) { if (!strcmp(argv[1], "--missing-ok")) missing_ok = 1; -- cgit v1.2.1