Skip to content

Commit

Permalink
Merge branch 'maint'
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
gitster committed Oct 18, 2008
2 parents f4a75a4 + f430c8e commit 58e0fa5
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 10 deletions.
10 changes: 9 additions & 1 deletion Documentation/RelNotes-1.6.0.3.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down Expand Up @@ -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
3 changes: 2 additions & 1 deletion Documentation/diff-options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 7 additions & 7 deletions contrib/stats/packinfo.pl
Original file line number Diff line number Diff line change
@@ -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".
Expand All @@ -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:
Expand All @@ -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:
#
Expand All @@ -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.
Expand Down Expand Up @@ -106,7 +106,7 @@
}

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);
Expand All @@ -117,7 +117,7 @@

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+(.*)$/) {
Expand Down
6 changes: 5 additions & 1 deletion sha1_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -2333,14 +2333,18 @@ 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;
buf = read_packed_sha1(sha1, &type, &len);
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)
Expand Down

0 comments on commit 58e0fa5

Please sign in to comment.