Merge branch 'maint'
authorJunio C Hamano <gitster@pobox.com>
Sat, 20 Mar 2010 18:29:19 +0000 (11:29 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sat, 20 Mar 2010 18:29:19 +0000 (11:29 -0700)
* maint:
Update draft release notes to 1.7.0.3
fetch: Fix minor memory leak
fetch: Future-proof initialization of a refspec on stack
fetch: Check for a "^{}" suffix with suffixcmp()
daemon: parse_host_and_port SIGSEGV if port is specified
Makefile: Fix CDPATH problem
pull: replace unnecessary sed invocation

Documentation/RelNotes-1.7.0.3.txt
Makefile
builtin/fetch.c
daemon.c
git-pull.sh
index ed936385a5fb93b213f4dc7e61c6a4a3d758f2bf..60bcbff112ad4399e7d48d8f889ce334f2a6012d 100644 (file)
@@ -9,6 +9,9 @@ Fixes since v1.7.0.2
 
  * "git add -i" didn't handle a deleted path very well.
 
+ * "git blame" padded line numbers with one extra SP when the total number
+   of lines was one less than multiple of ten due to an off-by-one error.
+
  * "git fetch --all/--multi" used to discard information for remotes that
    are fetched earlier.
 
@@ -16,6 +19,9 @@ Fixes since v1.7.0.2
    or are written by "me", instead of the ones that have "it" _and_ are
    written by "me".
 
+ * "git log -g branch" misbehaved when there was no entries in the reflog
+   for the named branch.
+
  * "git mailinfo" (hence "git am") incorrectly removed initial indent from
    paragraphs.
 
@@ -30,5 +36,5 @@ And other minor fixes and documentation updates.
 --
 exec >/var/tmp/1
 echo O=$(git describe)
-O=v1.7.0.2-53-g6eb3adf
+O=v1.7.0.2-69-g730b020
 git shortlog --no-merges $O..
index fc03436617f91614b8ac2c75b3c82ae9240685d4..3a6c6ea5259693db4846b91855675218b1e1a920 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -327,6 +327,12 @@ SCRIPT_SH =
 SCRIPT_LIB =
 TEST_PROGRAMS_NEED_X =
 
+# Having this variable in your environment would break pipelines because
+# you cause "cd" to echo its destination to stdout.  It can also take
+# scripts to unexpected places.  If you like CDPATH, define it for your
+# interactive shell sessions without exporting it.
+unexport CDPATH
+
 SCRIPT_SH += git-am.sh
 SCRIPT_SH += git-bisect.sh
 SCRIPT_SH += git-difftool--helper.sh
index 2bb75c130526d506b066c890cf165302dbb3c14d..957be9f9269c657fb094b1b3daa4f309c1324ae0 100644 (file)
@@ -107,10 +107,8 @@ static void add_merge_config(struct ref **head,
                 * there is no entry in the resulting FETCH_HEAD marked
                 * for merging.
                 */
+               memset(&refspec, 0, sizeof(refspec));
                refspec.src = branch->merge[i]->src;
-               refspec.dst = NULL;
-               refspec.pattern = 0;
-               refspec.force = 0;
                get_fetch_map(remote_refs, &refspec, tail, 1);
                for (rm = *old_tail; rm; rm = rm->next)
                        rm->merge = 1;
@@ -391,9 +389,10 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,
                                fputc(url[i], fp);
                fputc('\n', fp);
 
-               if (ref)
+               if (ref) {
                        rc |= update_local_ref(ref, what, note);
-               else
+                       free(ref);
+               } else
                        sprintf(note, "* %-*s %-*s -> FETCH_HEAD",
                                TRANSPORT_SUMMARY_WIDTH, *kind ? kind : "branch",
                                 REFCOL_WIDTH, *what ? what : "HEAD");
@@ -590,7 +589,7 @@ static void find_non_local_tags(struct transport *transport,
                 * to fetch then we can mark the ref entry in the list
                 * as one to ignore by setting util to NULL.
                 */
-               if (!strcmp(ref->name + strlen(ref->name) - 3, "^{}")) {
+               if (!suffixcmp(ref->name, "^{}")) {
                        if (item && !has_sha1_file(ref->old_sha1) &&
                            !will_fetch(head, ref->old_sha1) &&
                            !has_sha1_file(item->util) &&
index 3769b6f570f20ed320fd5345281a5577c80d0a58..7d9e1c03e88d7785f4ff0d534563ba5778fbc244 100644 (file)
--- a/daemon.c
+++ b/daemon.c
@@ -420,7 +420,7 @@ static void parse_host_and_port(char *hostport, char **host,
                *host = hostport;
                *port = strrchr(hostport, ':');
                if (*port) {
-                       *port = '\0';
+                       **port = '\0';
                        ++*port;
                }
        }
index d45b50cf4783912cedc4b7764a609ea9b4176969..1a4729f7bb29205fb7bc251887dcd4f5237f1659 100755 (executable)
@@ -41,7 +41,7 @@ strategy_args= diffstat= no_commit= squash= no_ff= ff_only=
 log_arg= verbosity= progress=
 merge_args=
 curr_branch=$(git symbolic-ref -q HEAD)
-curr_branch_short=$(echo "$curr_branch" | sed "s|refs/heads/||")
+curr_branch_short="${curr_branch#refs/heads/}"
 rebase=$(git config --bool branch.$curr_branch_short.rebase)
 while :
 do