Merge branch 'maint'

* 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
This commit is contained in:
Junio C Hamano 2010-03-20 11:29:19 -07:00
commit 96203bb074
5 changed files with 20 additions and 9 deletions

View 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..

View File

@ -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

View 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) &&

View File

@ -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;
}
}

View File

@ -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