X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=receive-pack.c;h=06857eb77fef93788f54d17cca68924f5213c9db;hb=b893f09104ee5f1d8710dfe17cdf1cbac995f17a;hp=3a1b2ab694bf61a25b926caa8b2a00e00fabb5d9;hpb=6c5f9baa3bc0d63e141e0afc23110205379905a4;p=git.git diff --git a/receive-pack.c b/receive-pack.c index 3a1b2ab6..06857eb7 100644 --- a/receive-pack.c +++ b/receive-pack.c @@ -24,7 +24,7 @@ struct command { unsigned char updated; unsigned char old_sha1[20]; unsigned char new_sha1[20]; - char ref_name[]; + char ref_name[0]; }; static struct command *commands = NULL; @@ -269,7 +269,7 @@ int main(int argc, char **argv) /* If we have a ".git" directory, chdir to it */ chdir(".git"); - setenv("GIT_DIR", ".", 1); + putenv("GIT_DIR=."); if (access("objects", X_OK) < 0 || access("refs/heads", X_OK) < 0) die("%s doesn't appear to be a git directory", dir);