Sync with 1.7.0 series
authorJunio C Hamano <gitster@pobox.com>
Tue, 27 Jul 2010 22:01:36 +0000 (15:01 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 27 Jul 2010 22:01:36 +0000 (15:01 -0700)
1  2 
Documentation/git.txt
path.c
diff --combined Documentation/git.txt
index c4024d0edd9f77c49e6211c6950c6ccb775a70ff,46a215824e2e67a56f5791658cc231b5c60a2cfb..abbd9848e44b69904e0446dba46b694d118c366e
@@@ -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.0.6/git.html[documentation for release 1.7.0.6]
++
 +* 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.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 b4c8d917229a4187f36a76f43603fc036e65632e,f6226fcd557b1b06706775cb3a32cc780ee2b708..6b23023095d7e1a5cfc1aef8db6d6e5fb56b32de
--- 1/path.c
--- 2/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]);
 +}