Skip to content

Commit c7deb8d

Browse files
committed
Merge branch 'maint'
* maint: t/t9001-send-email.sh: fix stderr redirection in 'Invalid In-Reply-To' Clarify and extend the "git diff" format documentation git-show-ref.txt: clarify the pattern matching documentation: git-config minor cleanups Update test script annotate-tests.sh to handle missing/extra authors
2 parents 38a1887 + 5b57413 commit c7deb8d

File tree

5 files changed

+49
-25
lines changed

5 files changed

+49
-25
lines changed

Documentation/config.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1560,12 +1560,12 @@ push.default::
15601560
no refspec is implied by any of the options given on the command
15611561
line. Possible values are:
15621562
+
1563-
* `nothing` do not push anything.
1564-
* `matching` push all matching branches.
1563+
* `nothing` - do not push anything.
1564+
* `matching` - push all matching branches.
15651565
All branches having the same name in both ends are considered to be
15661566
matching. This is the default.
1567-
* `tracking` push the current branch to its upstream branch.
1568-
* `current` push the current branch to a branch of the same name.
1567+
* `tracking` - push the current branch to its upstream branch.
1568+
* `current` - push the current branch to a branch of the same name.
15691569

15701570
rebase.stat::
15711571
Whether to show a diffstat of what changed upstream since the last
@@ -1765,9 +1765,9 @@ status.showUntrackedFiles::
17651765
the untracked files. Possible values are:
17661766
+
17671767
--
1768-
- 'no' - Show no untracked files
1769-
- 'normal' - Shows untracked files and directories
1770-
- 'all' - Shows also individual files in untracked directories.
1768+
* `no` - Show no untracked files.
1769+
* `normal` - Show untracked files and directories.
1770+
* `all` - Show also individual files in untracked directories.
17711771
--
17721772
+
17731773
If this variable is not specified, it defaults to 'normal'.

Documentation/diff-generate-patch.txt

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,15 @@ patch file. You can customize the creation of such patches via the
99
GIT_EXTERNAL_DIFF and the GIT_DIFF_OPTS environment variables.
1010

1111
What the -p option produces is slightly different from the traditional
12-
diff format.
12+
diff format:
1313

14-
1. It is preceded with a "git diff" header, that looks like
15-
this:
14+
1. It is preceded with a "git diff" header that looks like this:
1615

1716
diff --git a/file1 b/file2
1817
+
1918
The `a/` and `b/` filenames are the same unless rename/copy is
2019
involved. Especially, even for a creation or a deletion,
21-
`/dev/null` is _not_ used in place of `a/` or `b/` filenames.
20+
`/dev/null` is _not_ used in place of the `a/` or `b/` filenames.
2221
+
2322
When rename/copy is involved, `file1` and `file2` show the
2423
name of the source file of the rename/copy and the name of
@@ -37,18 +36,39 @@ the file that rename/copy produces, respectively.
3736
similarity index <number>
3837
dissimilarity index <number>
3938
index <hash>..<hash> <mode>
40-
41-
3. TAB, LF, double quote and backslash characters in pathnames
42-
are represented as `\t`, `\n`, `\"` and `\\`, respectively.
43-
If there is need for such substitution then the whole
44-
pathname is put in double quotes.
45-
39+
+
40+
File modes are printed as 6-digit octal numbers including the file type
41+
and file permission bits.
42+
+
43+
Path names in extended headers do not include the `a/` and `b/` prefixes.
44+
+
4645
The similarity index is the percentage of unchanged lines, and
4746
the dissimilarity index is the percentage of changed lines. It
4847
is a rounded down integer, followed by a percent sign. The
4948
similarity index value of 100% is thus reserved for two equal
5049
files, while 100% dissimilarity means that no line from the old
5150
file made it into the new one.
51+
+
52+
The index line includes the SHA-1 checksum before and after the change.
53+
The <mode> is included if the file mode does not change; otherwise,
54+
separate lines indicate the old and the new mode.
55+
56+
3. TAB, LF, double quote and backslash characters in pathnames
57+
are represented as `\t`, `\n`, `\"` and `\\`, respectively.
58+
If there is need for such substitution then the whole
59+
pathname is put in double quotes.
60+
61+
4. All the `file1` files in the output refer to files before the
62+
commit, and all the `file2` files refer to files after the commit.
63+
It is incorrect to apply each change to each file sequentially. For
64+
example, this patch will swap a and b:
65+
66+
diff --git a/a b/b
67+
rename from a
68+
rename to b
69+
diff --git a/b b/a
70+
rename from b
71+
rename to a
5272

5373

5474
combined diff format

Documentation/git-show-ref.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,11 @@ OPTIONS
8484

8585
<pattern>...::
8686

87-
Show references matching one or more patterns.
87+
Show references matching one or more patterns. Patterns are matched from
88+
the end of the full name, and only complete parts are matched, e.g.
89+
'master' matches 'refs/heads/master', 'refs/remotes/origin/master',
90+
'refs/tags/jedi/master' but not 'refs/heads/mymaster' nor
91+
'refs/remotes/master/jedi'.
8892

8993
OUTPUT
9094
------

t/annotate-tests.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,27 @@ check_count () {
88
$PROG file $head >.result || return 1
99
cat .result | perl -e '
1010
my %expect = (@ARGV);
11-
my %count = ();
11+
my %count = map { $_ => 0 } keys %expect;
1212
while (<STDIN>) {
1313
if (/^[0-9a-f]+\t\(([^\t]+)\t/) {
1414
my $author = $1;
1515
for ($author) { s/^\s*//; s/\s*$//; }
16-
if (exists $expect{$author}) {
17-
$count{$author}++;
18-
}
16+
$count{$author}++;
1917
}
2018
}
2119
my $bad = 0;
2220
while (my ($author, $count) = each %count) {
2321
my $ok;
24-
if ($expect{$author} != $count) {
22+
my $value = 0;
23+
$value = $expect{$author} if defined $expect{$author};
24+
if ($value != $count) {
2525
$bad = 1;
2626
$ok = "bad";
2727
}
2828
else {
2929
$ok = "good";
3030
}
31-
print STDERR "Author $author (expected $expect{$author}, attributed $count) $ok\n";
31+
print STDERR "Author $author (expected $value, attributed $count) $ok\n";
3232
}
3333
exit($bad);
3434
' "$@"

t/t9001-send-email.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ test_expect_success $PREREQ 'Invalid In-Reply-To' '
279279
280280
--in-reply-to=" " \
281281
--smtp-server="$(pwd)/fake.sendmail" \
282-
$patches
282+
$patches \
283283
2>errors
284284
! grep "^In-Reply-To: < *>" msgtxt1
285285
'

0 commit comments

Comments
 (0)