From c6720cfa49fde6d78b010c088a476d226d161983 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sun, 21 Jun 2009 02:01:28 -0700 Subject: t3505: fix abuse of test_expect_code The test wanted to make sure that cherry-pick exits with status 1, but with the way it was placed after "git checkout master &&" meant that it could have misjudged success if checkout barfed with the same failure status. Signed-off-by: Junio C Hamano diff --git a/t/t3505-cherry-pick-empty.sh b/t/t3505-cherry-pick-empty.sh index 9aaeabd..e51e505 100755 --- a/t/t3505-cherry-pick-empty.sh +++ b/t/t3505-cherry-pick-empty.sh @@ -17,11 +17,11 @@ test_expect_success setup ' ' -test_expect_code 1 'cherry-pick an empty commit' ' - - git checkout master && - git cherry-pick empty-branch - +test_expect_success 'cherry-pick an empty commit' ' + git checkout master && { + git cherry-pick empty-branch + test "$?" = 1 + } ' test_expect_success 'index lockfile was removed' ' -- cgit v0.10.2-6-g49f6 From e2f6331a14213f01a6e68e71ed63c77323a3e759 Mon Sep 17 00:00:00 2001 From: Nanako Shiraishi Date: Fri, 19 Jun 2009 19:42:53 +0900 Subject: .gitattributes: CR at the end of the line is an error When a CR is accidentally added at the end of a C source file in the git project tree, "git diff --check" doesn't detect it as an error. $ echo abQ | tr Q '\015' >>fast-import.c $ git diff --check I think this is because the "whitespace" attribute is set to *.[ch] files without specifying what kind of errors are caught. It makes git "notice all types of errors" (as described in the documentation), but I think it is incorrectly setting cr-at-eol, too, and hides this error. Signed-off-by: Nanako Shiraishi Signed-off-by: Junio C Hamano diff --git a/.gitattributes b/.gitattributes index 6b9c715..0636dee 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,2 @@ * whitespace=!indent,trail,space -*.[ch] whitespace +*.[ch] whitespace=indent,trail,space -- cgit v0.10.2-6-g49f6 From a437900fd7643408e1d7a130b4a6b81bfd816d4e Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sun, 21 Jun 2009 02:35:18 -0700 Subject: attribute: whitespace set to true detects all errors known to git That is what the documentation says, but the code pretends as if all the known whitespace error tokens were given. Among the whitespace error tokens, there is one kind that loosens the rule when set: cr-at-eol. Which means that whitespace error token that is set to true ignores a newly introduced CR at the end, which is inconsistent with the documentation. Signed-off-by: Junio C Hamano diff --git a/ws.c b/ws.c index b1efcd9..819c797 100644 --- a/ws.c +++ b/ws.c @@ -10,11 +10,12 @@ static struct whitespace_rule { const char *rule_name; unsigned rule_bits; + unsigned loosens_error; } whitespace_rule_names[] = { - { "trailing-space", WS_TRAILING_SPACE }, - { "space-before-tab", WS_SPACE_BEFORE_TAB }, - { "indent-with-non-tab", WS_INDENT_WITH_NON_TAB }, - { "cr-at-eol", WS_CR_AT_EOL }, + { "trailing-space", WS_TRAILING_SPACE, 0 }, + { "space-before-tab", WS_SPACE_BEFORE_TAB, 0 }, + { "indent-with-non-tab", WS_INDENT_WITH_NON_TAB, 0 }, + { "cr-at-eol", WS_CR_AT_EOL, 1 }, }; unsigned parse_whitespace_rule(const char *string) @@ -79,7 +80,8 @@ unsigned whitespace_rule(const char *pathname) unsigned all_rule = 0; int i; for (i = 0; i < ARRAY_SIZE(whitespace_rule_names); i++) - all_rule |= whitespace_rule_names[i].rule_bits; + if (!whitespace_rule_names[i].loosens_error) + all_rule |= whitespace_rule_names[i].rule_bits; return all_rule; } else if (ATTR_FALSE(value)) { /* false (-whitespace) */ -- cgit v0.10.2-6-g49f6 From cff4231a1dfbe68b4a163b31406d862567d3243a Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sun, 21 Jun 2009 21:02:49 -0700 Subject: GIT 1.6.3.3 Signed-off-by: Junio C Hamano diff --git a/Documentation/RelNotes-1.6.3.3.txt b/Documentation/RelNotes-1.6.3.3.txt new file mode 100644 index 0000000..1c28398 --- /dev/null +++ b/Documentation/RelNotes-1.6.3.3.txt @@ -0,0 +1,38 @@ +GIT v1.6.3.3 Release Notes +========================== + +Fixes since v1.6.3.2 +-------------------- + + * "git archive" running on Cygwin can get stuck in an infinite loop. + + * "git daemon" did not correctly parse the initial line that carries + virtual host request information. + + * "git diff --textconv" leaked memory badly when the textconv filter + errored out. + + * The built-in regular expressions to pick function names to put on + hunk header lines for java and objc were very inefficiently written. + + * in certain error situations git-fetch (and git-clone) on Windows didn't + detect connection abort and ended up waiting indefinitely. + + * import-tars script (in contrib) did not import symbolic links correctly. + + * http.c used CURLOPT_SSLKEY even on libcURL version 7.9.2, even though + it was only available starting 7.9.3. + + * low-level filelevel merge driver used return value from strdup() + without checking if we ran out of memory. + + * "git rebase -i" left stray closing parenthesis in its reflog message. + + * "git remote show" did not show all the URLs associated with the named + remote, even though "git remote -v" did. Made them consistent by + making the former show all URLs. + + * "whitespace" attribute that is set was meant to detect all errors known + to git, but it told git to ignore trailing carriage-returns. + +Includes other documentation fixes. diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index 0673f0d..902bfbf 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -1,7 +1,7 @@ #!/bin/sh GVF=GIT-VERSION-FILE -DEF_VER=v1.6.3.2 +DEF_VER=v1.6.3.3 LF=' ' diff --git a/RelNotes b/RelNotes index a433be5..392186f 120000 --- a/RelNotes +++ b/RelNotes @@ -1 +1 @@ -Documentation/RelNotes-1.6.3.2.txt \ No newline at end of file +Documentation/RelNotes-1.6.3.3.txt \ No newline at end of file -- cgit v0.10.2-6-g49f6