X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=path.c;h=6395cf23098841c16d993ae7e86b2d8dcff01cd7;hb=a6e3768f641c2703266422aa05c05f1d01e886b2;hp=94ddd7eafcb11313f00dac964de520c535d202ae;hpb=c847f537125ceab3425205721fdaaa834e6d8a83;p=git.git diff --git a/path.c b/path.c index 94ddd7eaf..6395cf230 100644 --- a/path.c +++ b/path.c @@ -114,7 +114,7 @@ int validate_headref(const char *path) fd = open(path, O_RDONLY); if (fd < 0) return -1; - len = read(fd, buffer, sizeof(buffer)-1); + len = read_in_full(fd, buffer, sizeof(buffer)-1); close(fd); /* @@ -252,7 +252,7 @@ char *enter_repo(char *path, int strict) if (access("objects", X_OK) == 0 && access("refs", X_OK) == 0 && validate_headref("HEAD") == 0) { - putenv("GIT_DIR=."); + setenv("GIT_DIR", ".", 1); check_repository_format(); return path; }