projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
git-clone --shared should imply --local
[git.git]
/
path.c
diff --git
a/path.c
b/path.c
index
d635470
..
2c077c0
100644
(file)
--- a/
path.c
+++ b/
path.c
@@
-131,7
+131,7
@@
int validate_symref(const char *path)
return -1;
}
return -1;
}
-static char *current_dir()
+static char *current_dir(
void
)
{
return getcwd(pathname, sizeof(pathname));
}
{
return getcwd(pathname, sizeof(pathname));
}
@@
-181,7
+181,7
@@
char *enter_repo(char *path, int strict)
return NULL;
if (strict) {
return NULL;
if (strict) {
- if
((path[0] != '/') ||
chdir(path) < 0)
+ if
(
chdir(path) < 0)
return NULL;
}
else {
return NULL;
}
else {
@@
-199,6
+199,7
@@
char *enter_repo(char *path, int strict)
if(access("objects", X_OK) == 0 && access("refs", X_OK) == 0 &&
validate_symref("HEAD") == 0) {
putenv("GIT_DIR=.");
if(access("objects", X_OK) == 0 && access("refs", X_OK) == 0 &&
validate_symref("HEAD") == 0) {
putenv("GIT_DIR=.");
+ check_repository_format();
return current_dir();
}
return current_dir();
}