From: Junio C Hamano Date: Tue, 27 Jul 2010 22:01:36 +0000 (-0700) Subject: Sync with 1.7.0 series X-Git-Tag: v1.7.1.2~1 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/e5498e8a9f9a596ecff78426bbf904626cd7863a?ds=inline;hp=-c Sync with 1.7.0 series --- e5498e8a9f9a596ecff78426bbf904626cd7863a diff --combined Documentation/git.txt index c4024d0edd,46a215824e..abbd9848e4 --- a/Documentation/git.txt +++ b/Documentation/git.txt @@@ -43,14 -43,10 +43,16 @@@ unreleased) version of git, that is ava branch of the `git.git` repository. Documentation for older releases are available here: ++ +* link:v1.7.1/git.html[documentation for release 1.7.1] + +* release notes for + link:RelNotes-1.7.1.txt[1.7.1]. + - * link:v1.7.0.6/git.html[documentation for release 1.7.0.6] + * link:v1.7.0.7/git.html[documentation for release 1.7.0.7] * release notes for + link:RelNotes-1.7.0.7.txt[1.7.0.7], link:RelNotes-1.7.0.6.txt[1.7.0.6], link:RelNotes-1.7.0.5.txt[1.7.0.5], link:RelNotes-1.7.0.4.txt[1.7.0.4], diff --combined path.c index b4c8d91722,f6226fcd55..6b23023095 --- a/path.c +++ b/path.c @@@ -316,6 -316,8 +316,8 @@@ char *expand_user_path(const char *path size_t username_len = first_slash - username; if (username_len == 0) { const char *home = getenv("HOME"); + if (!home) + goto return_null; strbuf_add(&user_path, home, strlen(home)); } else { struct passwd *pw = getpw_str(username, username_len); @@@ -415,7 -417,7 +417,7 @@@ char *enter_repo(char *path, int strict if (access("objects", X_OK) == 0 && access("refs", X_OK) == 0 && validate_headref("HEAD") == 0) { - setenv(GIT_DIR_ENVIRONMENT, ".", 1); + set_git_dir("."); check_repository_format(); return path; } @@@ -728,10 -730,3 +730,10 @@@ int daemon_avoid_alias(const char *p } } } + +int offset_1st_component(const char *path) +{ + if (has_dos_drive_prefix(path)) + return 2 + is_dir_sep(path[2]); + return is_dir_sep(path[0]); +}