From: Junio C Hamano Date: Wed, 14 Nov 2007 11:37:18 +0000 (-0800) Subject: Merge branch 'maint' X-Git-Tag: v1.5.4-rc0~217 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=fb5fd011482b5aa0b340a4a5bd9192c0efc1edb7;p=git.git Merge branch 'maint' * maint: git-clean: honor core.excludesfile Documentation: Fix man page breakage with DocBook XSL v1.72 git-remote.txt: fix typo core-tutorial.txt: Fix argument mistake in an example. replace reference to git-rm with git-reset in git-commit doc Grammar fixes for gitattributes documentation Don't allow fast-import tree delta chains to exceed maximum depth revert/cherry-pick: allow starting from dirty work tree. t/t3404: fix test for a bogus todo file. Conflicts: fast-import.c --- fb5fd011482b5aa0b340a4a5bd9192c0efc1edb7 diff --cc fast-import.c index f93d7d6c9,5e83296bf..98c2bd535 --- a/fast-import.c +++ b/fast-import.c @@@ -1095,9 -1120,8 +1098,8 @@@ static int store_object write_or_die(pack_data->pack_fd, hdr + pos, sizeof(hdr) - pos); pack_size += sizeof(hdr) - pos; } else { - if (last) - last->depth = 0; + e->depth = 0; - hdrlen = encode_header(type, datlen, hdr); + hdrlen = encode_header(type, dat->len, hdr); write_or_die(pack_data->pack_fd, hdr, hdrlen); pack_size += hdrlen; } @@@ -1108,12 -1132,12 +1110,13 @@@ free(out); free(delta); if (last) { - if (!last->no_free) - free(last->data); - last->data = dat; + if (last->no_swap) { + last->data = *dat; + } else { + strbuf_swap(&last->data, dat); + } last->offset = e->offset; + last->depth = e->depth; - last->len = datlen; } return 0; }