From f98157720239f0dd94d03632dc873e3eb3135e2f Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 10 Apr 2007 00:56:33 +0200 Subject: [PATCH 1/4] (encode_85, decode_85): Mark source buffer pointer as "const". Signed-off-by: Jim Meyering Signed-off-by: Junio C Hamano --- base85.c | 4 ++-- cache.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/base85.c b/base85.c index a9e97f89d9..a6c41d597a 100644 --- a/base85.c +++ b/base85.c @@ -37,7 +37,7 @@ static void prep_base85(void) } } -int decode_85(char *dst, char *buffer, int len) +int decode_85(char *dst, const char *buffer, int len) { prep_base85(); @@ -82,7 +82,7 @@ int decode_85(char *dst, char *buffer, int len) return 0; } -void encode_85(char *buf, unsigned char *data, int bytes) +void encode_85(char *buf, const unsigned char *data, int bytes) { prep_base85(); diff --git a/cache.h b/cache.h index 384b260227..1904131f27 100644 --- a/cache.h +++ b/cache.h @@ -468,8 +468,8 @@ extern int pager_in_use; extern int pager_use_color; /* base85 */ -int decode_85(char *dst, char *line, int linelen); -void encode_85(char *buf, unsigned char *data, int bytes); +int decode_85(char *dst, const char *line, int linelen); +void encode_85(char *buf, const unsigned char *data, int bytes); /* alloc.c */ struct blob; From 8eb2d0bee8813ac37dc602d12b0abba632e96152 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 11 Apr 2007 01:28:43 -0700 Subject: [PATCH 2/4] fsck: do not complain on detached HEAD. Detached HEAD is just a normal state of a repository. Do not say anything about it. Do not give worrying "error:" messages when we let the user know that the HEAD points at nothing (i.e. yet to be born branch), nor we do not have any default refs to start following the objects chain. Reword them as "notice:". Signed-off-by: Junio C Hamano --- builtin-fsck.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/builtin-fsck.c b/builtin-fsck.c index 21f1f9e91d..7c3b0a535f 100644 --- a/builtin-fsck.c +++ b/builtin-fsck.c @@ -532,7 +532,7 @@ static void get_default_heads(void) * "show_unreachable" flag. */ if (!default_refs) { - error("No default references"); + fprintf(stderr, "notice: No default references\n"); show_unreachable = 0; } } @@ -552,15 +552,23 @@ static int fsck_head_link(void) { unsigned char sha1[20]; int flag; - const char *head_points_at = resolve_ref("HEAD", sha1, 1, &flag); + int null_is_error = 0; + const char *head_points_at = resolve_ref("HEAD", sha1, 0, &flag); - if (!head_points_at || !(flag & REF_ISSYMREF)) - return error("HEAD is not a symbolic ref"); - if (prefixcmp(head_points_at, "refs/heads/")) + if (!head_points_at) + return error("Invalid HEAD"); + if (!strcmp(head_points_at, "HEAD")) + /* detached HEAD */ + null_is_error = 1; + else if (prefixcmp(head_points_at, "refs/heads/")) return error("HEAD points to something strange (%s)", head_points_at); - if (is_null_sha1(sha1)) - return error("HEAD: not a valid git pointer"); + if (is_null_sha1(sha1)) { + if (null_is_error) + return error("HEAD: detached HEAD points at nothing"); + fprintf(stderr, "notice: HEAD points to an unborn branch (%s)\n", + head_points_at + 11); + } return 0; } From cb52d9a1fbb2298d73bfa5dc86a0155cc462ecf2 Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Wed, 11 Apr 2007 22:38:19 +0200 Subject: [PATCH 3/4] cvsserver: Fix handling of diappeared files on update Only send a modified response if the client sent a "Modified" entry. This fixes the case where the file was locally deleted on the client without being removed from CVS. In this case the client will only have sent the Entry for the file but nothing else. Signed-off-by: Frank Lichtenheld Acked-by: Martin Langhoff Acked-by: Daniel Barkalow Signed-off-by: Junio C Hamano --- git-cvsserver.perl | 1 + 1 file changed, 1 insertion(+) diff --git a/git-cvsserver.perl b/git-cvsserver.perl index 68aa75255e..25816c5a21 100755 --- a/git-cvsserver.perl +++ b/git-cvsserver.perl @@ -843,6 +843,7 @@ sub req_update if ( defined ( $wrev ) and defined($meta->{revision}) and $wrev == $meta->{revision} + and defined($state->{entries}{$filename}{modified_hash}) and not exists ( $state->{opt}{C} ) ) { $log->info("Tell the client the file is modified"); From 9b11d24d4156e0b2246383faad16eb8aa0caeefb Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 11 Apr 2007 14:39:07 -0700 Subject: [PATCH 4/4] GIT 1.5.1.1 Signed-off-by: Junio C Hamano --- Documentation/RelNotes-1.5.1.1.txt | 29 ++++++++++++++++++++++------- GIT-VERSION-GEN | 2 +- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/Documentation/RelNotes-1.5.1.1.txt b/Documentation/RelNotes-1.5.1.1.txt index b48b4bc3e8..3054b5a3f0 100644 --- a/Documentation/RelNotes-1.5.1.1.txt +++ b/Documentation/RelNotes-1.5.1.1.txt @@ -1,4 +1,4 @@ -GIT v1.5.1.1 Release Notes (draft) +GIT v1.5.1.1 Release Notes ========================== Fixes since v1.5.1 @@ -10,8 +10,23 @@ Fixes since v1.5.1 - The documentation for cvsimport has been majorly improved. + - "git-show-ref --exclude-existing" was documented. + * Bugfixes + - The implementation of -p option in "git cvsexportcommit" had + the meaning of -C (context reduction) option wrong, and + loosened the context requirements when it was told to be + strict. + + - "git cvsserver" did not behave like the real cvsserver when + client side removed a file from the working tree without + doing anything else on the path. In such a case, it should + restore it from the checked out revision. + + - "git fsck" issued an alarming error message on detached + HEAD. It is not an error since at least 1.5.0. + - "git send-email" produced of References header of unbounded length; fixed this with line-folding. @@ -37,10 +52,10 @@ Fixes since v1.5.1 - gitweb did not show type-changing patch correctly in the blobdiff view. -* Performance Tweaks + - git-svn did not error out with incorrect command line options. --- -exec >/var/tmp/1 -O=v1.5.1-26-ge94a4f6 -echo O=`git describe refs/heads/maint` -git shortlog --no-merges $O..refs/heads/maint + - git-svn fell into an infinite loop when insanely long commit + message was found. + + - git-svn dcommit and rebase was confused by patches that were + merged from another branch that is managed by git-svn. diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index 48715012be..2325660ff4 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -1,7 +1,7 @@ #!/bin/sh GVF=GIT-VERSION-FILE -DEF_VER=v1.5.1.GIT +DEF_VER=v1.5.1.1.GIT LF=' '