X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=receive-pack.c;h=d4e82bf99397d2e719e8bbe1e0e72142d04fb4cb;hb=b7e438f951f68be704b001343811e9ff89da07f7;hp=1768c875311d43a35636bab37d547c199a12b6e1;hpb=f312de018b48853d166040908b0ba2bf666e26c1;p=git.git diff --git a/receive-pack.c b/receive-pack.c index 1768c875..d4e82bf9 100644 --- a/receive-pack.c +++ b/receive-pack.c @@ -110,6 +110,7 @@ static void execute_commands(void) update(cmd->ref_name, cmd->old_sha1, cmd->new_sha1); cmd = cmd->next; } + update_server_info(0); } static void read_head_info(void) @@ -197,9 +198,7 @@ int main(int argc, char **argv) /* chdir to the directory. If that fails, try appending ".git" */ if (chdir(dir) < 0) { - static char path[PATH_MAX]; - snprintf(path, sizeof(path), "%s.git", dir); - if (chdir(path) < 0) + if (chdir(mkpath("%s.git", dir)) < 0) die("unable to cd to %s", dir); }