From: Junio C Hamano Date: Fri, 13 Aug 2010 01:07:09 +0000 (-0700) Subject: Merge branch 'maint' X-Git-Tag: v1.7.3-rc0~90 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/642f7108f68ef622b338d27d94a956e32c8567dd?ds=inline;hp=-c Merge branch 'maint' * maint: push: mention "git pull" in error message for non-fast forwards Standardize do { ... } while (0) style t/t7003: replace \t with literal tab in sed expression index-pack: Don't follow replace refs. --- 642f7108f68ef622b338d27d94a956e32c8567dd diff --combined builtin/push.c index a2cc9fdea1,69bc2f27ac..e655eb7695 --- a/builtin/push.c +++ b/builtin/push.c @@@ -22,13 -22,13 +22,13 @@@ static int progress static const char **refspec; static int refspec_nr; +static int refspec_alloc; static void add_refspec(const char *ref) { - int nr = refspec_nr + 1; - refspec = xrealloc(refspec, nr * sizeof(char *)); - refspec[nr-1] = ref; - refspec_nr = nr; + refspec_nr++; + ALLOC_GROW(refspec, refspec_nr, refspec_alloc); + refspec[refspec_nr-1] = ref; } static void set_refspecs(const char **refs, int nr) @@@ -130,8 -130,8 +130,8 @@@ static int push_with_options(struct tra if (nonfastforward && advice_push_nonfastforward) { fprintf(stderr, "To prevent you from losing history, non-fast-forward updates were rejected\n" - "Merge the remote changes before pushing again. See the 'Note about\n" - "fast-forwards' section of 'git push --help' for details.\n"); + "Merge the remote changes (e.g. 'git pull') before pushing again. See the\n" + "'Note about fast-forwards' section of 'git push --help' for details.\n"); } return 1;