update(cmd->ref_name, cmd->old_sha1, cmd->new_sha1);
cmd = cmd->next;
}
+ update_server_info(0);
}
static void read_head_info(void)
/* 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);
}