From 915308b187bdaba9ad1c6c3dea7b2b4b200b4796 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Thu, 29 Jan 2009 00:56:34 -0500 Subject: [PATCH 1/2] avoid 31-bit truncation in write_loose_object The size of the content we are adding may be larger than 2.1G (i.e., "git add gigantic-file"). Most of the code-path to do so uses size_t or unsigned long to record the size, but write_loose_object uses a signed int. On platforms where "int" is 32-bits (which includes x86_64 Linux platforms), we end up passing malloc a negative size. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- sha1_file.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sha1_file.c b/sha1_file.c index 88035a0cd1..0cfea9edc1 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -2280,7 +2280,8 @@ static int create_tmpfile(char *buffer, size_t bufsiz, const char *filename) static int write_loose_object(const unsigned char *sha1, char *hdr, int hdrlen, void *buf, unsigned long len, time_t mtime) { - int fd, size, ret; + int fd, ret; + size_t size; unsigned char *compressed; z_stream stream; char *filename; From b296e8fce6de6a40a41b5168dfbe735d11255256 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Thu, 29 Jan 2009 00:12:52 -0800 Subject: [PATCH 2/2] GIT 1.6.1.2 Signed-off-by: Junio C Hamano --- Documentation/RelNotes-1.6.1.2.txt | 39 ++++++++++++++++++++++++++++++ GIT-VERSION-GEN | 2 +- RelNotes | 2 +- 3 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 Documentation/RelNotes-1.6.1.2.txt diff --git a/Documentation/RelNotes-1.6.1.2.txt b/Documentation/RelNotes-1.6.1.2.txt new file mode 100644 index 0000000000..230aa3d8e8 --- /dev/null +++ b/Documentation/RelNotes-1.6.1.2.txt @@ -0,0 +1,39 @@ +GIT v1.6.1.2 Release Notes +========================== + +Fixes since v1.6.1.1 +-------------------- + +* The logic for rename detectin in internal diff used by commands like + "git diff" and "git blame" have been optimized to avoid loading the same + blob repeatedly. + +* We did not allow writing out a blob that is larger than 2GB for no good + reason. + +* "git format-patch -o $dir", when $dir is a relative directory, used it + as relative to the root of the work tree, not relative to the current + directory. + +* v1.6.1 introduced an optimization for "git push" into a repository (A) + that borrows its objects from another repository (B) to avoid sending + objects that are available in repository B, when they are not yet used + by repository A. However the code on the "git push" sender side was + buggy and did not work when repository B had new objects that are not + known by the sender. This caused pushing into a "forked" repository + served by v1.6.1 software using "git push" from v1.6.1 sometimes did not + work. The bug was purely on the "git push" sender side, and has been + corrected. + +* "git status -v" did not paint its diff output in colour even when + color.ui configuration was set. + +* "git ls-tree" learned --full-tree option to help Porcelain scripts that + want to always see the full path regardless of the current working + directory. + +* "git grep" incorrectly searched in work tree paths even when they are + marked as assume-unchanged. It now searches in the index entries. + +* "git gc" with no grace period needlessly ejected packed but unreachable + objects in their loose form, only to delete them right away. diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index fe496e5fca..3697edc72e 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -1,7 +1,7 @@ #!/bin/sh GVF=GIT-VERSION-FILE -DEF_VER=v1.6.1.1.GIT +DEF_VER=v1.6.1.2.GIT LF=' ' diff --git a/RelNotes b/RelNotes index 2ebf251ddf..da6e81321a 120000 --- a/RelNotes +++ b/RelNotes @@ -1 +1 @@ -Documentation/RelNotes-1.6.1.1.txt \ No newline at end of file +Documentation/RelNotes-1.6.1.2.txt \ No newline at end of file