Merge branch 'maint'

* maint:
  Hopefully the final draft release notes update before 1.6.0.3
  diff(1): clarify what "T"ypechange status means
  contrib: update packinfo.pl to not use dashed commands
  force_object_loose: Fix memory leak
  tests: shell negation portability fix
This commit is contained in:
Junio C Hamano 2008-10-18 08:26:44 -07:00
commit 58e0fa5416
4 changed files with 23 additions and 10 deletions

View File

@ -24,6 +24,12 @@ Fixes since v1.6.0.2
* "git diff --no-index" on binary files no longer outputs a bogus
"diff --git" header line.
* "git diff" hunk header patterns with multiple elements separated by LF
were not used correctly.
* "git gc" when ejecting otherwise unreachable objects from packfiles into
loose form leaked memory.
* Hunk headers in "git diff" default to using extended regular
expressions, fixing some of the internal patterns on non-GNU
platforms.
@ -47,6 +53,8 @@ Fixes since v1.6.0.2
* "git remote show -v" now displays all URLs of a remote.
* "git checkout -b branch" was confused when branch already existed.
* "git checkout -q" once again suppresses the locally modified file list.
* "git clone -q", "git fetch -q" asks remote side to not send
@ -107,6 +115,6 @@ Many other documentation updates.
--
exec >/var/tmp/1
O=v1.6.0.2-95-g72d404d
O=v1.6.0.2-110-gf07c3c5
echo O=$(git describe maint)
git shortlog --no-merges $O..maint

View File

@ -137,7 +137,8 @@ endif::git-format-patch[]
--diff-filter=[ACDMRTUXB*]::
Select only files that are Added (`A`), Copied (`C`),
Deleted (`D`), Modified (`M`), Renamed (`R`), have their
type (mode) changed (`T`), are Unmerged (`U`), are
type (i.e. regular file, symlink, submodule, ...) changed (`T`),
are Unmerged (`U`), are
Unknown (`X`), or have had their pairing Broken (`B`).
Any combination of the filter characters may be used.
When `*` (All-or-none) is added to the combination, all

View File

@ -1,9 +1,9 @@
#!/usr/bin/perl
#
# This tool will print vaguely pretty information about a pack. It
# expects the output of "git-verify-pack -v" as input on stdin.
# expects the output of "git verify-pack -v" as input on stdin.
#
# $ git-verify-pack -v | packinfo.pl
# $ git verify-pack -v | packinfo.pl
#
# This prints some full-pack statistics; currently "all sizes", "all
# path sizes", "tree sizes", "tree path sizes", and "depths".
@ -20,7 +20,7 @@
#
# When run as:
#
# $ git-verify-pack -v | packinfo.pl -tree
# $ git verify-pack -v | packinfo.pl -tree
#
# the trees of objects are output along with the stats. This looks
# like:
@ -43,7 +43,7 @@
#
# When run as:
#
# $ git-verify-pack -v | packinfo.pl -tree -filenames
# $ git verify-pack -v | packinfo.pl -tree -filenames
#
# it adds filenames to the tree. Getting this information is slow:
#
@ -58,7 +58,7 @@
#
# When run as:
#
# $ git-verify-pack -v | packinfo.pl -dump
# $ git verify-pack -v | packinfo.pl -dump
#
# it prints out "sha1 size pathsize depth" for each sha1 in lexical
# order.
@ -106,7 +106,7 @@ while (<STDIN>) {
}
if ($filenames && ($tree || $dump)) {
open(NAMES, "git-name-rev --all|");
open(NAMES, "git name-rev --all|");
while (<NAMES>) {
if (/^(\S+)\s+(.*)$/) {
my ($sha1, $name) = ($1, $2);
@ -117,7 +117,7 @@ if ($filenames && ($tree || $dump)) {
for my $commit (@commits) {
my $name = $names{$commit};
open(TREE, "git-ls-tree -t -r $commit|");
open(TREE, "git ls-tree -t -r $commit|");
print STDERR "Plumbing tree $name\n";
while (<TREE>) {
if (/^(\S+)\s+(\S+)\s+(\S+)\s+(.*)$/) {

View File

@ -2333,6 +2333,7 @@ int force_object_loose(const unsigned char *sha1, time_t mtime)
enum object_type type;
char hdr[32];
int hdrlen;
int ret;
if (has_loose_object(sha1))
return 0;
@ -2340,7 +2341,10 @@ int force_object_loose(const unsigned char *sha1, time_t mtime)
if (!buf)
return error("cannot read sha1_file for %s", sha1_to_hex(sha1));
hdrlen = sprintf(hdr, "%s %lu", typename(type), len) + 1;
return write_loose_object(sha1, hdr, hdrlen, buf, len, mtime);
ret = write_loose_object(sha1, hdr, hdrlen, buf, len, mtime);
free(buf);
return ret;
}
int has_pack_index(const unsigned char *sha1)