Skip to content

Commit 566f5b2

Browse files
author
Junio C Hamano
committed
Merge branch 'maint'
* maint: GIT 1.5.1.1 cvsserver: Fix handling of diappeared files on update fsck: do not complain on detached HEAD. (encode_85, decode_85): Mark source buffer pointer as "const".
2 parents b06dcf8 + 9b11d24 commit 566f5b2

File tree

6 files changed

+44
-20
lines changed

6 files changed

+44
-20
lines changed

Documentation/RelNotes-1.5.1.1.txt

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
GIT v1.5.1.1 Release Notes (draft)
1+
GIT v1.5.1.1 Release Notes
22
==========================
33

44
Fixes since v1.5.1
@@ -10,8 +10,23 @@ Fixes since v1.5.1
1010

1111
- The documentation for cvsimport has been majorly improved.
1212

13+
- "git-show-ref --exclude-existing" was documented.
14+
1315
* Bugfixes
1416

17+
- The implementation of -p option in "git cvsexportcommit" had
18+
the meaning of -C (context reduction) option wrong, and
19+
loosened the context requirements when it was told to be
20+
strict.
21+
22+
- "git cvsserver" did not behave like the real cvsserver when
23+
client side removed a file from the working tree without
24+
doing anything else on the path. In such a case, it should
25+
restore it from the checked out revision.
26+
27+
- "git fsck" issued an alarming error message on detached
28+
HEAD. It is not an error since at least 1.5.0.
29+
1530
- "git send-email" produced of References header of unbounded length;
1631
fixed this with line-folding.
1732

@@ -37,10 +52,10 @@ Fixes since v1.5.1
3752
- gitweb did not show type-changing patch correctly in the
3853
blobdiff view.
3954

40-
* Performance Tweaks
55+
- git-svn did not error out with incorrect command line options.
56+
57+
- git-svn fell into an infinite loop when insanely long commit
58+
message was found.
4159

42-
--
43-
exec >/var/tmp/1
44-
O=v1.5.1-26-ge94a4f6
45-
echo O=`git describe refs/heads/maint`
46-
git shortlog --no-merges $O..refs/heads/maint
60+
- git-svn dcommit and rebase was confused by patches that were
61+
merged from another branch that is managed by git-svn.

GIT-VERSION-GEN

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22

33
GVF=GIT-VERSION-FILE
4-
DEF_VER=v1.5.1.GIT
4+
DEF_VER=v1.5.1.1.GIT
55

66
LF='
77
'

base85.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ static void prep_base85(void)
3737
}
3838
}
3939

40-
int decode_85(char *dst, char *buffer, int len)
40+
int decode_85(char *dst, const char *buffer, int len)
4141
{
4242
prep_base85();
4343

@@ -82,7 +82,7 @@ int decode_85(char *dst, char *buffer, int len)
8282
return 0;
8383
}
8484

85-
void encode_85(char *buf, unsigned char *data, int bytes)
85+
void encode_85(char *buf, const unsigned char *data, int bytes)
8686
{
8787
prep_base85();
8888

builtin-fsck.c

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ static void get_default_heads(void)
534534
* "show_unreachable" flag.
535535
*/
536536
if (!default_refs) {
537-
error("No default references");
537+
fprintf(stderr, "notice: No default references\n");
538538
show_unreachable = 0;
539539
}
540540
}
@@ -554,15 +554,23 @@ static int fsck_head_link(void)
554554
{
555555
unsigned char sha1[20];
556556
int flag;
557-
const char *head_points_at = resolve_ref("HEAD", sha1, 1, &flag);
558-
559-
if (!head_points_at || !(flag & REF_ISSYMREF))
560-
return error("HEAD is not a symbolic ref");
561-
if (prefixcmp(head_points_at, "refs/heads/"))
557+
int null_is_error = 0;
558+
const char *head_points_at = resolve_ref("HEAD", sha1, 0, &flag);
559+
560+
if (!head_points_at)
561+
return error("Invalid HEAD");
562+
if (!strcmp(head_points_at, "HEAD"))
563+
/* detached HEAD */
564+
null_is_error = 1;
565+
else if (prefixcmp(head_points_at, "refs/heads/"))
562566
return error("HEAD points to something strange (%s)",
563567
head_points_at);
564-
if (is_null_sha1(sha1))
565-
return error("HEAD: not a valid git pointer");
568+
if (is_null_sha1(sha1)) {
569+
if (null_is_error)
570+
return error("HEAD: detached HEAD points at nothing");
571+
fprintf(stderr, "notice: HEAD points to an unborn branch (%s)\n",
572+
head_points_at + 11);
573+
}
566574
return 0;
567575
}
568576

cache.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -472,8 +472,8 @@ extern int pager_in_use;
472472
extern int pager_use_color;
473473

474474
/* base85 */
475-
int decode_85(char *dst, char *line, int linelen);
476-
void encode_85(char *buf, unsigned char *data, int bytes);
475+
int decode_85(char *dst, const char *line, int linelen);
476+
void encode_85(char *buf, const unsigned char *data, int bytes);
477477

478478
/* alloc.c */
479479
struct blob;

git-cvsserver.perl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -843,6 +843,7 @@ sub req_update
843843
if ( defined ( $wrev )
844844
and defined($meta->{revision})
845845
and $wrev == $meta->{revision}
846+
and defined($state->{entries}{$filename}{modified_hash})
846847
and not exists ( $state->{opt}{C} ) )
847848
{
848849
$log->info("Tell the client the file is modified");

0 commit comments

Comments
 (0)