Skip to content

Commit 8146f19

Browse files
committed
Merge branch 'maint'
* maint: improve error message in config.c t4018-diff-funcname: add cpp xfuncname pattern to syntax test Work around BSD whose typeof(tv.tv_sec) != time_t git-am.txt: reword extra headers in message body git-am.txt: Use date or value instead of time or timestamp git-am.txt: add an 'a', say what 'it' is, simplify a sentence dir.c: Fix two minor grammatical errors in comments git-svn: fix a sloppy Getopt::Long usage
2 parents ae616de + 54e0e6e commit 8146f19

File tree

5 files changed

+21
-19
lines changed

5 files changed

+21
-19
lines changed

Documentation/git-am.txt

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ OPTIONS
3232

3333
-s::
3434
--signoff::
35-
Add `Signed-off-by:` line to the commit message, using
35+
Add a `Signed-off-by:` line to the commit message, using
3636
the committer identity of yourself.
3737

3838
-k::
@@ -79,14 +79,14 @@ default. You can use `--no-utf8` to override this.
7979
message as the commit author date, and uses the time of
8080
commit creation as the committer date. This allows the
8181
user to lie about the committer date by using the same
82-
timestamp as the author date.
82+
value as the author date.
8383

8484
--ignore-date::
8585
By default the command records the date from the e-mail
8686
message as the commit author date, and uses the time of
8787
commit creation as the committer date. This allows the
88-
user to lie about author timestamp by using the same
89-
timestamp as the committer date.
88+
user to lie about the author date by using the same
89+
value as the committer date.
9090

9191
--skip::
9292
Skip the current patch. This is only meaningful when
@@ -115,21 +115,21 @@ DISCUSSION
115115
----------
116116

117117
The commit author name is taken from the "From: " line of the
118-
message, and commit author time is taken from the "Date: " line
118+
message, and commit author date is taken from the "Date: " line
119119
of the message. The "Subject: " line is used as the title of
120120
the commit, after stripping common prefix "[PATCH <anything>]".
121-
It is supposed to describe what the commit is about concisely as
122-
a one line text.
121+
The "Subject: " line is supposed to concisely describe what the
122+
commit is about in one line of text.
123123

124-
The body of the message (the rest of the message after the blank line
125-
that terminates the RFC2822 headers) can begin with "Subject: " and
126-
"From: " lines that are different from those of the mail header,
127-
to override the values of these fields.
124+
"From: " and "Subject: " lines starting the body (the rest of the
125+
message after the blank line terminating the RFC2822 headers)
126+
override the respective commit author name and title values taken
127+
from the headers.
128128

129129
The commit message is formed by the title taken from the
130130
"Subject: ", a blank line and the body of the message up to
131-
where the patch begins. Excess whitespace characters at the end of the
132-
lines are automatically stripped.
131+
where the patch begins. Excess whitespace at the end of each
132+
line is automatically stripped.
133133

134134
The patch is expected to be inline, directly following the
135135
message. Any line that is of the form:
@@ -141,7 +141,7 @@ message. Any line that is of the form:
141141
is taken as the beginning of a patch, and the commit log message
142142
is terminated before the first occurrence of such a line.
143143

144-
When initially invoking it, you give it the names of the mailboxes
144+
When initially invoking `git am`, you give it the names of the mailboxes
145145
to process. Upon seeing the first patch that does not apply, it
146146
aborts in the middle. You can recover from this in one of two ways:
147147

date.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -871,13 +871,15 @@ unsigned long approxidate(const char *date)
871871
int number = 0;
872872
struct tm tm, now;
873873
struct timeval tv;
874+
time_t time_sec;
874875
char buffer[50];
875876

876877
if (parse_date(date, buffer, sizeof(buffer)) > 0)
877878
return strtoul(buffer, NULL, 10);
878879

879880
gettimeofday(&tv, NULL);
880-
localtime_r(&tv.tv_sec, &tm);
881+
time_sec = tv.tv_sec;
882+
localtime_r(&time_sec, &tm);
881883
now = tm;
882884
for (;;) {
883885
unsigned char c = *date;

dir.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ int common_prefix(const char **pathspec)
5353
}
5454

5555
/*
56-
* Does 'match' matches the given name?
56+
* Does 'match' match the given name?
5757
* A match is found if
5858
*
5959
* (1) the 'match' string is leading directory of 'name', or
@@ -290,7 +290,7 @@ static void prep_exclude(struct dir_struct *dir, const char *base, int baselen)
290290
dir->basebuf[baselen] = '\0';
291291
}
292292

293-
/* Scan the list and let the last match determines the fate.
293+
/* Scan the list and let the last match determine the fate.
294294
* Return 1 for exclude, 0 for include and -1 for undecided.
295295
*/
296296
static int excluded_1(const char *pathname,

git-svn.perl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ BEGIN
147147
'dry-run|n' => \$_dry_run } ],
148148
'set-tree' => [ \&cmd_set_tree,
149149
"Set an SVN repository to a git tree-ish",
150-
{ 'stdin|' => \$_stdin, %cmt_opts, %fc_opts, } ],
150+
{ 'stdin' => \$_stdin, %cmt_opts, %fc_opts, } ],
151151
'create-ignore' => [ \&cmd_create_ignore,
152152
'Create a .gitignore per svn:ignore',
153153
{ 'revision|r=i' => \$_revision

t/t4018-diff-funcname.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ EOF
3232

3333
sed 's/beer\\/beer,\\/' < Beer.java > Beer-correct.java
3434

35-
builtin_patterns="bibtex html java objc pascal php python ruby tex"
35+
builtin_patterns="bibtex cpp html java objc pascal php python ruby tex"
3636
for p in $builtin_patterns
3737
do
3838
test_expect_success "builtin $p pattern compiles" '

0 commit comments

Comments
 (0)