From: Junio C Hamano Date: Wed, 24 Aug 2011 19:18:02 +0000 (-0700) Subject: Sync with 1.7.6.1 X-Git-Tag: v1.7.7-rc0~11 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/b7fcd007153b5021ed70ddc0a224127f14601bbc?ds=inline;hp=-c Sync with 1.7.6.1 Signed-off-by: Junio C Hamano --- b7fcd007153b5021ed70ddc0a224127f14601bbc diff --combined Documentation/git.txt index 710d750cfd,b4ff5be1fd..d08a8bb4f2 --- a/Documentation/git.txt +++ b/Documentation/git.txt @@@ -10,8 -10,8 +10,8 @@@ SYNOPSI -------- [verse] 'git' [--version] [--exec-path[=]] [--html-path] [--man-path] [--info-path] - [-p|--paginate|--no-pager] [--no-replace-objects] - [--bare] [--git-dir=] [--work-tree=] + [-p|--paginate|--no-pager] [--no-replace-objects] [--bare] + [--git-dir=] [--work-tree=] [--namespace=] [-c =] [--help] [] @@@ -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=:: + 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 6420918abe,03adf28550..8739bfacdf --- a/upload-pack.c +++ b/upload-pack.c @@@ -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; @@@ -749,7 -750,7 +751,7 @@@ 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;