Sync with 1.7.6.1
authorJunio C Hamano <gitster@pobox.com>
Wed, 24 Aug 2011 19:18:02 +0000 (12:18 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 24 Aug 2011 19:18:02 +0000 (12:18 -0700)
Signed-off-by: Junio C Hamano <gitster@pobox.com>
1  2 
Documentation/git.txt
upload-pack.c
diff --combined Documentation/git.txt
index 710d750cfd7a67bacedaa851afaeed4469d38a77,b4ff5be1fd4b10ae549774268f981883472e858e..d08a8bb4f2bcf106f925346b274740cd7a136de9
@@@ -10,8 -10,8 +10,8 @@@ SYNOPSI
  --------
  [verse]
  'git' [--version] [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
 -    [-p|--paginate|--no-pager] [--no-replace-objects]
 -    [--bare] [--git-dir=<path>] [--work-tree=<path>]
 +    [-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
 +    [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
      [-c <name>=<value>]
      [--help] <command> [<args>]
  
@@@ -44,9 -44,10 +44,10 @@@ unreleased) version of git, that is ava
  branch of the `git.git` repository.
  Documentation for older releases are available here:
  
- * link:v1.7.6/git.html[documentation for release 1.7.6]
+ * link:v1.7.6.1/git.html[documentation for release 1.7.6.1]
  
  * release notes for
+   link:RelNotes/1.7.6.1.txt[1.7.6.1].
    link:RelNotes/1.7.6.txt[1.7.6].
  
  * link:v1.7.5.4/git.html[documentation for release 1.7.5.4]
@@@ -330,11 -331,6 +331,11 @@@ help ...`
        variable (see core.worktree in linkgit:git-config[1] for a
        more detailed discussion).
  
 +--namespace=<path>::
 +      Set the git namespace.  See linkgit:gitnamespaces[7] for more
 +      details.  Equivalent to setting the `GIT_NAMESPACE` environment
 +      variable.
 +
  --bare::
        Treat the repository as a bare repository.  If GIT_DIR
        environment is not set, it is set to the current working
@@@ -598,10 -594,6 +599,10 @@@ git so take care if using Cogito etc
        This can also be controlled by the '--work-tree' command line
        option and the core.worktree configuration variable.
  
 +'GIT_NAMESPACE'::
 +      Set the git namespace; see linkgit:gitnamespaces[7] for details.
 +      The '--namespace' command-line option also sets this value.
 +
  'GIT_CEILING_DIRECTORIES'::
        This should be a colon-separated list of absolute paths.
        If set, it is a list of directories that git should not chdir
diff --combined upload-pack.c
index 6420918abea3a9a33ad967d263153e4548daab29,03adf28550a30ecd441b9586fc9dfa638c939ce3..8739bfacdfd4e01e16a614dd419388fa93a904b6
@@@ -533,6 -533,8 +533,8 @@@ static void check_non_tip(void
        namebuf[41] = '\n';
        for (i = get_max_object_index(); 0 < i; ) {
                o = get_indexed_object(--i);
+               if (!o)
+                       continue;
                if (!(o->flags & OUR_REF))
                        continue;
                memcpy(namebuf + 1, sha1_to_hex(o->sha1), 40);
@@@ -730,17 -732,16 +732,17 @@@ static int send_ref(const char *refname
                " side-band-64k ofs-delta shallow no-progress"
                " include-tag multi_ack_detailed";
        struct object *o = parse_object(sha1);
 +      const char *refname_nons = strip_namespace(refname);
  
        if (!o)
                die("git upload-pack: cannot find object %s:", sha1_to_hex(sha1));
  
        if (capabilities)
 -              packet_write(1, "%s %s%c%s%s\n", sha1_to_hex(sha1), refname,
 +              packet_write(1, "%s %s%c%s%s\n", sha1_to_hex(sha1), refname_nons,
                             0, capabilities,
                             stateless_rpc ? " no-done" : "");
        else
 -              packet_write(1, "%s %s\n", sha1_to_hex(sha1), refname);
 +              packet_write(1, "%s %s\n", sha1_to_hex(sha1), refname_nons);
        capabilities = NULL;
        if (!(o->flags & OUR_REF)) {
                o->flags |= OUR_REF;
        if (o->type == OBJ_TAG) {
                o = deref_tag(o, refname, 0);
                if (o)
 -                      packet_write(1, "%s %s^{}\n", sha1_to_hex(o->sha1), refname);
 +                      packet_write(1, "%s %s^{}\n", sha1_to_hex(o->sha1), refname_nons);
        }
        return 0;
  }
@@@ -770,12 -771,12 +772,12 @@@ static void upload_pack(void
  {
        if (advertise_refs || !stateless_rpc) {
                reset_timeout();
 -              head_ref(send_ref, NULL);
 -              for_each_ref(send_ref, NULL);
 +              head_ref_namespaced(send_ref, NULL);
 +              for_each_namespaced_ref(send_ref, NULL);
                packet_flush(1);
        } else {
 -              head_ref(mark_our_ref, NULL);
 -              for_each_ref(mark_our_ref, NULL);
 +              head_ref_namespaced(mark_our_ref, NULL);
 +              for_each_namespaced_ref(mark_our_ref, NULL);
        }
        if (advertise_refs)
                return;