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

1  2 
Makefile
builtin/fetch.c
git-pull.sh

diff --cc Makefile
index fc03436617f91614b8ac2c75b3c82ae9240685d4,98372ebbfcabc0b96d33bdcde045ff73de971e28..3a6c6ea5259693db4846b91855675218b1e1a920
+++ b/Makefile
@@@ -324,9 -315,14 +324,15 @@@ PROGRAMS 
  SCRIPT_PERL =
  SCRIPT_PYTHON =
  SCRIPT_SH =
 -TEST_PROGRAMS =
 +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
diff --cc builtin/fetch.c
index 2bb75c130526d506b066c890cf165302dbb3c14d,bbc425b655e456d57e37118690a088351162ff3c..957be9f9269c657fb094b1b3daa4f309c1324ae0
@@@ -391,11 -387,12 +389,12 @@@ static int store_updated_refs(const cha
                                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",
 -                              SUMMARY_WIDTH, *kind ? kind : "branch",
 +                              TRANSPORT_SUMMARY_WIDTH, *kind ? kind : "branch",
                                 REFCOL_WIDTH, *what ? what : "HEAD");
                if (*note) {
                        if (verbosity >= 0 && !shown_url) {
diff --cc git-pull.sh
index d45b50cf4783912cedc4b7764a609ea9b4176969,246a3a4b373dba87877204c90c9f808dfa93c45c..1a4729f7bb29205fb7bc251887dcd4f5237f1659
@@@ -38,10 -38,10 +38,10 @@@ test -z "$(git ls-files -u)" || die_con
  test -f "$GIT_DIR/MERGE_HEAD" && die_merge
  
  strategy_args= diffstat= no_commit= squash= no_ff= ff_only=
 -log_arg= verbosity=
 +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