From 27eea66b28e15890ae587303c1c316388845169e Mon Sep 17 00:00:00 2001 From: Kevin Ballard Date: Sat, 16 Oct 2010 04:09:20 -0700 Subject: [PATCH 1/5] Update test script annotate-tests.sh to handle missing/extra authors The current script used by annotate-tests.sh (used by t8001 and t8002) fails to emit a warning if any of the expected authors never show up in the output or if authors that show up in the output were never specified as expected. Update the script to fail in both of these scenarios. Helped-by: Jakub Narebski Signed-off-by: Kevin Ballard Signed-off-by: Junio C Hamano --- t/annotate-tests.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/t/annotate-tests.sh b/t/annotate-tests.sh index 396b9653a..141b60cdc 100644 --- a/t/annotate-tests.sh +++ b/t/annotate-tests.sh @@ -8,27 +8,27 @@ check_count () { $PROG file $head >.result || return 1 cat .result | perl -e ' my %expect = (@ARGV); - my %count = (); + my %count = map { $_ => 0 } keys %expect; while () { if (/^[0-9a-f]+\t\(([^\t]+)\t/) { my $author = $1; for ($author) { s/^\s*//; s/\s*$//; } - if (exists $expect{$author}) { - $count{$author}++; - } + $count{$author}++; } } my $bad = 0; while (my ($author, $count) = each %count) { my $ok; - if ($expect{$author} != $count) { + my $value = 0; + $value = $expect{$author} if defined $expect{$author}; + if ($value != $count) { $bad = 1; $ok = "bad"; } else { $ok = "good"; } - print STDERR "Author $author (expected $expect{$author}, attributed $count) $ok\n"; + print STDERR "Author $author (expected $value, attributed $count) $ok\n"; } exit($bad); ' "$@" From 9373bdc402585963e58f57e75b6396dd08becc77 Mon Sep 17 00:00:00 2001 From: Cliff Frey Date: Sun, 17 Oct 2010 20:10:45 -0700 Subject: [PATCH 2/5] documentation: git-config minor cleanups Change push.default's description to add hyphens between values and descriptions to make the manpage easier to read. The html version is readable either way. Change status.showUntrackedFiles to make item descriptions be sentences and to use the same asciidoc format as push.default. The only visual change is the additions of "." Signed-off-by: Cliff Frey Acked-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- Documentation/config.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Documentation/config.txt b/Documentation/config.txt index d82c0da2c..7f6b2109b 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -1550,12 +1550,12 @@ push.default:: no refspec is implied by any of the options given on the command line. Possible values are: + -* `nothing` do not push anything. -* `matching` push all matching branches. +* `nothing` - do not push anything. +* `matching` - push all matching branches. All branches having the same name in both ends are considered to be matching. This is the default. -* `tracking` push the current branch to its upstream branch. -* `current` push the current branch to a branch of the same name. +* `tracking` - push the current branch to its upstream branch. +* `current` - push the current branch to a branch of the same name. rebase.stat:: Whether to show a diffstat of what changed upstream since the last @@ -1755,9 +1755,9 @@ status.showUntrackedFiles:: the untracked files. Possible values are: + -- - - 'no' - Show no untracked files - - 'normal' - Shows untracked files and directories - - 'all' - Shows also individual files in untracked directories. +* `no` - Show no untracked files. +* `normal` - Show untracked files and directories. +* `all` - Show also individual files in untracked directories. -- + If this variable is not specified, it defaults to 'normal'. From 9fbd8986bb475befb27e0597c2ce0a7ce015334c Mon Sep 17 00:00:00 2001 From: Michael J Gruber Date: Mon, 18 Oct 2010 13:33:32 +0200 Subject: [PATCH 3/5] git-show-ref.txt: clarify the pattern matching git-show-ref really does not do what one would expect under the name pattern matching, so describe it. Signed-off-by: Michael J Gruber Signed-off-by: Junio C Hamano --- Documentation/git-show-ref.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Documentation/git-show-ref.txt b/Documentation/git-show-ref.txt index 4696af743..be0ec189a 100644 --- a/Documentation/git-show-ref.txt +++ b/Documentation/git-show-ref.txt @@ -84,7 +84,11 @@ OPTIONS ...:: - Show references matching one or more patterns. + Show references matching one or more patterns. Patterns are matched from + the end of the full name, and only complete parts are matched, e.g. + 'master' matches 'refs/heads/master', 'refs/remotes/origin/master', + 'refs/tags/jedi/master' but not 'refs/heads/mymaster' nor + 'refs/remotes/master/jedi'. OUTPUT ------ From 9659df52822a2fd7f85725d2ff680871b1f3bdc7 Mon Sep 17 00:00:00 2001 From: Andreas Gruenbacher Date: Thu, 14 Oct 2010 12:53:11 +0200 Subject: [PATCH 4/5] Clarify and extend the "git diff" format documentation Move the similarity and dissimilarity index header description closer to where those extended headers are described. Describe and/or clarify the format used for file modes, pathnames, and the index header. Document that all "old" files refer to the state before applying the *entire* output, and all "new" files refer to the state thereafter. Signed-off-by: Andreas Gruenbacher Signed-off-by: Junio C Hamano --- Documentation/diff-generate-patch.txt | 40 ++++++++++++++++++++------- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/Documentation/diff-generate-patch.txt b/Documentation/diff-generate-patch.txt index 8f9a2412f..3ac2beac6 100644 --- a/Documentation/diff-generate-patch.txt +++ b/Documentation/diff-generate-patch.txt @@ -9,16 +9,15 @@ patch file. You can customize the creation of such patches via the GIT_EXTERNAL_DIFF and the GIT_DIFF_OPTS environment variables. What the -p option produces is slightly different from the traditional -diff format. +diff format: -1. It is preceded with a "git diff" header, that looks like - this: +1. It is preceded with a "git diff" header that looks like this: diff --git a/file1 b/file2 + The `a/` and `b/` filenames are the same unless rename/copy is involved. Especially, even for a creation or a deletion, -`/dev/null` is _not_ used in place of `a/` or `b/` filenames. +`/dev/null` is _not_ used in place of the `a/` or `b/` filenames. + When rename/copy is involved, `file1` and `file2` show the name of the source file of the rename/copy and the name of @@ -37,18 +36,39 @@ the file that rename/copy produces, respectively. similarity index dissimilarity index index .. - -3. TAB, LF, double quote and backslash characters in pathnames - are represented as `\t`, `\n`, `\"` and `\\`, respectively. - If there is need for such substitution then the whole - pathname is put in double quotes. - ++ +File modes are printed as 6-digit octal numbers including the file type +and file permission bits. ++ +Path names in extended headers do not include the `a/` and `b/` prefixes. ++ The similarity index is the percentage of unchanged lines, and the dissimilarity index is the percentage of changed lines. It is a rounded down integer, followed by a percent sign. The similarity index value of 100% is thus reserved for two equal files, while 100% dissimilarity means that no line from the old file made it into the new one. ++ +The index line includes the SHA-1 checksum before and after the change. +The is included if the file mode does not change; otherwise, +separate lines indicate the old and the new mode. + +3. TAB, LF, double quote and backslash characters in pathnames + are represented as `\t`, `\n`, `\"` and `\\`, respectively. + If there is need for such substitution then the whole + pathname is put in double quotes. + +4. All the `file1` files in the output refer to files before the + commit, and all the `file2` files refer to files after the commit. + It is incorrect to apply each change to each file sequentially. For + example, this patch will swap a and b: + + diff --git a/a b/b + rename from a + rename to b + diff --git a/b b/a + rename from b + rename to a combined diff format From 5b57413cb3952654031115f6f840e3dcb120914e Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Tue, 19 Oct 2010 11:50:39 +0200 Subject: [PATCH 5/5] t/t9001-send-email.sh: fix stderr redirection in 'Invalid In-Reply-To' Signed-off-by: Antonio Ospite Signed-off-by: Junio C Hamano --- t/t9001-send-email.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh index 71b3df9b5..07c50c764 100755 --- a/t/t9001-send-email.sh +++ b/t/t9001-send-email.sh @@ -279,7 +279,7 @@ test_expect_success $PREREQ 'Invalid In-Reply-To' ' --to=nobody@example.com \ --in-reply-to=" " \ --smtp-server="$(pwd)/fake.sendmail" \ - $patches + $patches \ 2>errors ! grep "^In-Reply-To: < *>" msgtxt1 '