Skip to content

Commit 17a0299

Browse files
committed
Merge branch 'maint'
* maint: contrib/thunderbird-patch-inline: do not require bash to run the script t8001: check the exit status of the command being tested strbuf.h: remove a tad stale docs-in-comment and reference api-doc instead Typos: t/README Documentation/config.txt: make truth value of numbers more explicit git-pack-objects.txt: fix grammatical errors parse-remote: replace unnecessary sed invocation
2 parents 44a9ced + 806e0ab commit 17a0299

File tree

7 files changed

+19
-53
lines changed

7 files changed

+19
-53
lines changed

Documentation/config.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Internal whitespace within a variable value is retained verbatim.
6262

6363
The values following the equals sign in variable assign are all either
6464
a string, an integer, or a boolean. Boolean values may be given as yes/no,
65-
0/1, true/false or on/off. Case is not significant in boolean values, when
65+
1/0, true/false or on/off. Case is not significant in boolean values, when
6666
converting value to the canonical form using '--bool' type specifier;
6767
'git config' will ensure that the output is "true" or "false".
6868

Documentation/git-pack-objects.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,9 @@ self-contained. Use `git index-pack --fix-thin`
190190
(see linkgit:git-index-pack[1]) to restore the self-contained property.
191191

192192
--delta-base-offset::
193-
A packed archive can express base object of a delta as
194-
either 20-byte object name or as an offset in the
195-
stream, but older version of git does not understand the
193+
A packed archive can express the base object of a delta as
194+
either a 20-byte object name or as an offset in the
195+
stream, but older versions of git don't understand the
196196
latter. By default, 'git pack-objects' only uses the
197197
former format for better compatibility. This option
198198
allows the command to use the latter format for

contrib/thunderbird-patch-inline/appp.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
#!/bin/bash
1+
#!/bin/sh
22
# Copyright 2008 Lukas Sandström <[email protected]>
33
#
44
# AppendPatch - A script to be used together with ExternalEditor
5-
# for Mozilla Thunderbird to properly include pathes inline i e-mails.
5+
# for Mozilla Thunderbird to properly include patches inline in e-mails.
66

77
# ExternalEditor can be downloaded at http://globs.org/articles.php?lng=en&pg=2
88

git-parse-remote.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
GIT_DIR=$(git rev-parse -q --git-dir) || :;
66

77
get_default_remote () {
8-
curr_branch=$(git symbolic-ref -q HEAD | sed -e 's|^refs/heads/||')
8+
curr_branch=$(git symbolic-ref -q HEAD)
9+
curr_branch="${cur_branch#refs/heads/}"
910
origin=$(git config --get "branch.$curr_branch.remote")
1011
echo ${origin:-origin}
1112
}

strbuf.h

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,7 @@
11
#ifndef STRBUF_H
22
#define STRBUF_H
33

4-
/*
5-
* Strbuf's can be use in many ways: as a byte array, or to store arbitrary
6-
* long, overflow safe strings.
7-
*
8-
* Strbufs has some invariants that are very important to keep in mind:
9-
*
10-
* 1. the ->buf member is always malloc-ed, hence strbuf's can be used to
11-
* build complex strings/buffers whose final size isn't easily known.
12-
*
13-
* It is NOT legal to copy the ->buf pointer away.
14-
* `strbuf_detach' is the operation that detaches a buffer from its shell
15-
* while keeping the shell valid wrt its invariants.
16-
*
17-
* 2. the ->buf member is a byte array that has at least ->len + 1 bytes
18-
* allocated. The extra byte is used to store a '\0', allowing the ->buf
19-
* member to be a valid C-string. Every strbuf function ensures this
20-
* invariant is preserved.
21-
*
22-
* Note that it is OK to "play" with the buffer directly if you work it
23-
* that way:
24-
*
25-
* strbuf_grow(sb, SOME_SIZE);
26-
* ... Here, the memory array starting at sb->buf, and of length
27-
* ... strbuf_avail(sb) is all yours, and you are sure that
28-
* ... strbuf_avail(sb) is at least SOME_SIZE.
29-
* strbuf_setlen(sb, sb->len + SOME_OTHER_SIZE);
30-
*
31-
* Of course, SOME_OTHER_SIZE must be smaller or equal to strbuf_avail(sb).
32-
*
33-
* Doing so is safe, though if it has to be done in many places, adding the
34-
* missing API to the strbuf module is the way to go.
35-
*
36-
* XXX: do _not_ assume that the area that is yours is of size ->alloc - 1
37-
* even if it's true in the current implementation. Alloc is somehow a
38-
* "private" member that should not be messed with.
39-
*/
4+
/* See Documentation/technical/api-strbuf.txt */
405

416
#include <assert.h>
427

t/README

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ we are testing.
201201
If you create files under t/ directory (i.e. here) that is not
202202
the top-level test script, never name the file to match the above
203203
pattern. The Makefile here considers all such files as the
204-
top-level test script and tries to run all of them. A care is
204+
top-level test script and tries to run all of them. Care is
205205
especially needed if you are creating a common test library
206206
file, similar to test-lib.sh, because such a library file may
207207
not be suitable for standalone execution.
@@ -285,9 +285,8 @@ Do:
285285
- Check the test coverage for your tests. See the "Test coverage"
286286
below.
287287

288-
Don't blindly follow test coverage metrics, they're a good way to
289-
spot if you've missed something. If a new function you added
290-
doesn't have any coverage you're probably doing something wrong,
288+
Don't blindly follow test coverage metrics; if a new function you added
289+
doesn't have any coverage, then you're probably doing something wrong,
291290
but having 100% coverage doesn't necessarily mean that you tested
292291
everything.
293292

@@ -431,7 +430,7 @@ library for your script to use.
431430
- test_tick
432431

433432
Make commit and tag names consistent by setting the author and
434-
committer times to defined stated. Subsequent calls will
433+
committer times to defined state. Subsequent calls will
435434
advance the times by a fixed amount.
436435

437436
- test_commit <message> [<filename> [<contents>]]

t/t8001-annotate.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ test_description='git annotate'
66
PROG='git annotate'
77
. "$TEST_DIRECTORY"/annotate-tests.sh
88

9-
test_expect_success \
10-
'Annotating an old revision works' \
11-
'[ $(git annotate file master | awk "{print \$3}" | grep -c "^A$") -eq 2 ] && \
12-
[ $(git annotate file master | awk "{print \$3}" | grep -c "^B$") -eq 2 ]'
13-
9+
test_expect_success 'Annotating an old revision works' '
10+
git annotate file master >result &&
11+
awk "{ print \$3; }" <result >authors &&
12+
test 2 = $(grep A <authors | wc -l) &&
13+
test 2 = $(grep B <authors | wc -l)
14+
'
1415

1516
test_done

0 commit comments

Comments
 (0)