X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=receive-pack.c;h=1ef0c13935751903efc5c2dee738604a80b75de2;hb=10d781b9caa4f71495c7b34963bef137216f86a8;hp=9026f1bf828abdceb907054bf54ecfb7311df5e1;hpb=3f81fc82743ccd4fd7157f1f1db41605eb018fb9;p=git.git diff --git a/receive-pack.c b/receive-pack.c index 9026f1bf..1ef0c139 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[0]; + char ref_name[]; }; 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);