summaryrefslogtreecommitdiff
path: root/write-tree.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-11-26 08:50:02 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-11-29 07:13:02 (GMT)
commit53228a5fb8e80f87803e4a3ba8ed25b70fb4871d (patch)
tree0097d17996b5c71f3fb386eef354c84ffa3caaf2 /write-tree.c
parent5a3277133d200151fe526e56e036c933d343958a (diff)
downloadgit-53228a5fb8e80f87803e4a3ba8ed25b70fb4871d.zip
git-53228a5fb8e80f87803e4a3ba8ed25b70fb4871d.tar.gz
git-53228a5fb8e80f87803e4a3ba8ed25b70fb4871d.tar.bz2
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 <junkio@cox.net>
Diffstat (limited to 'write-tree.c')
-rw-r--r--write-tree.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/write-tree.c b/write-tree.c
index 2b2c6b7..0aac32f 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;