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 usagemaint
commit
8146f19762
|
@ -32,7 +32,7 @@ OPTIONS
|
||||||
|
|
||||||
-s::
|
-s::
|
||||||
--signoff::
|
--signoff::
|
||||||
Add `Signed-off-by:` line to the commit message, using
|
Add a `Signed-off-by:` line to the commit message, using
|
||||||
the committer identity of yourself.
|
the committer identity of yourself.
|
||||||
|
|
||||||
-k::
|
-k::
|
||||||
|
@ -79,14 +79,14 @@ default. You can use `--no-utf8` to override this.
|
||||||
message as the commit author date, and uses the time of
|
message as the commit author date, and uses the time of
|
||||||
commit creation as the committer date. This allows the
|
commit creation as the committer date. This allows the
|
||||||
user to lie about the committer date by using the same
|
user to lie about the committer date by using the same
|
||||||
timestamp as the author date.
|
value as the author date.
|
||||||
|
|
||||||
--ignore-date::
|
--ignore-date::
|
||||||
By default the command records the date from the e-mail
|
By default the command records the date from the e-mail
|
||||||
message as the commit author date, and uses the time of
|
message as the commit author date, and uses the time of
|
||||||
commit creation as the committer date. This allows the
|
commit creation as the committer date. This allows the
|
||||||
user to lie about author timestamp by using the same
|
user to lie about the author date by using the same
|
||||||
timestamp as the committer date.
|
value as the committer date.
|
||||||
|
|
||||||
--skip::
|
--skip::
|
||||||
Skip the current patch. This is only meaningful when
|
Skip the current patch. This is only meaningful when
|
||||||
|
@ -115,21 +115,21 @@ DISCUSSION
|
||||||
----------
|
----------
|
||||||
|
|
||||||
The commit author name is taken from the "From: " line of the
|
The commit author name is taken from the "From: " line of the
|
||||||
message, and commit author time is taken from the "Date: " line
|
message, and commit author date is taken from the "Date: " line
|
||||||
of the message. The "Subject: " line is used as the title of
|
of the message. The "Subject: " line is used as the title of
|
||||||
the commit, after stripping common prefix "[PATCH <anything>]".
|
the commit, after stripping common prefix "[PATCH <anything>]".
|
||||||
It is supposed to describe what the commit is about concisely as
|
The "Subject: " line is supposed to concisely describe what the
|
||||||
a one line text.
|
commit is about in one line of text.
|
||||||
|
|
||||||
The body of the message (the rest of the message after the blank line
|
"From: " and "Subject: " lines starting the body (the rest of the
|
||||||
that terminates the RFC2822 headers) can begin with "Subject: " and
|
message after the blank line terminating the RFC2822 headers)
|
||||||
"From: " lines that are different from those of the mail header,
|
override the respective commit author name and title values taken
|
||||||
to override the values of these fields.
|
from the headers.
|
||||||
|
|
||||||
The commit message is formed by the title taken from the
|
The commit message is formed by the title taken from the
|
||||||
"Subject: ", a blank line and the body of the message up to
|
"Subject: ", a blank line and the body of the message up to
|
||||||
where the patch begins. Excess whitespace characters at the end of the
|
where the patch begins. Excess whitespace at the end of each
|
||||||
lines are automatically stripped.
|
line is automatically stripped.
|
||||||
|
|
||||||
The patch is expected to be inline, directly following the
|
The patch is expected to be inline, directly following the
|
||||||
message. Any line that is of the form:
|
message. Any line that is of the form:
|
||||||
|
@ -141,7 +141,7 @@ message. Any line that is of the form:
|
||||||
is taken as the beginning of a patch, and the commit log message
|
is taken as the beginning of a patch, and the commit log message
|
||||||
is terminated before the first occurrence of such a line.
|
is terminated before the first occurrence of such a line.
|
||||||
|
|
||||||
When initially invoking it, you give it the names of the mailboxes
|
When initially invoking `git am`, you give it the names of the mailboxes
|
||||||
to process. Upon seeing the first patch that does not apply, it
|
to process. Upon seeing the first patch that does not apply, it
|
||||||
aborts in the middle. You can recover from this in one of two ways:
|
aborts in the middle. You can recover from this in one of two ways:
|
||||||
|
|
||||||
|
|
4
date.c
4
date.c
|
@ -871,13 +871,15 @@ unsigned long approxidate(const char *date)
|
||||||
int number = 0;
|
int number = 0;
|
||||||
struct tm tm, now;
|
struct tm tm, now;
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
|
time_t time_sec;
|
||||||
char buffer[50];
|
char buffer[50];
|
||||||
|
|
||||||
if (parse_date(date, buffer, sizeof(buffer)) > 0)
|
if (parse_date(date, buffer, sizeof(buffer)) > 0)
|
||||||
return strtoul(buffer, NULL, 10);
|
return strtoul(buffer, NULL, 10);
|
||||||
|
|
||||||
gettimeofday(&tv, NULL);
|
gettimeofday(&tv, NULL);
|
||||||
localtime_r(&tv.tv_sec, &tm);
|
time_sec = tv.tv_sec;
|
||||||
|
localtime_r(&time_sec, &tm);
|
||||||
now = tm;
|
now = tm;
|
||||||
for (;;) {
|
for (;;) {
|
||||||
unsigned char c = *date;
|
unsigned char c = *date;
|
||||||
|
|
4
dir.c
4
dir.c
|
@ -53,7 +53,7 @@ int common_prefix(const char **pathspec)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Does 'match' matches the given name?
|
* Does 'match' match the given name?
|
||||||
* A match is found if
|
* A match is found if
|
||||||
*
|
*
|
||||||
* (1) the 'match' string is leading directory of 'name', or
|
* (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)
|
||||||
dir->basebuf[baselen] = '\0';
|
dir->basebuf[baselen] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Scan the list and let the last match determines the fate.
|
/* Scan the list and let the last match determine the fate.
|
||||||
* Return 1 for exclude, 0 for include and -1 for undecided.
|
* Return 1 for exclude, 0 for include and -1 for undecided.
|
||||||
*/
|
*/
|
||||||
static int excluded_1(const char *pathname,
|
static int excluded_1(const char *pathname,
|
||||||
|
|
|
@ -147,7 +147,7 @@ my %cmd = (
|
||||||
'dry-run|n' => \$_dry_run } ],
|
'dry-run|n' => \$_dry_run } ],
|
||||||
'set-tree' => [ \&cmd_set_tree,
|
'set-tree' => [ \&cmd_set_tree,
|
||||||
"Set an SVN repository to a git tree-ish",
|
"Set an SVN repository to a git tree-ish",
|
||||||
{ 'stdin|' => \$_stdin, %cmt_opts, %fc_opts, } ],
|
{ 'stdin' => \$_stdin, %cmt_opts, %fc_opts, } ],
|
||||||
'create-ignore' => [ \&cmd_create_ignore,
|
'create-ignore' => [ \&cmd_create_ignore,
|
||||||
'Create a .gitignore per svn:ignore',
|
'Create a .gitignore per svn:ignore',
|
||||||
{ 'revision|r=i' => \$_revision
|
{ 'revision|r=i' => \$_revision
|
||||||
|
|
|
@ -32,7 +32,7 @@ EOF
|
||||||
|
|
||||||
sed 's/beer\\/beer,\\/' < Beer.java > Beer-correct.java
|
sed 's/beer\\/beer,\\/' < Beer.java > Beer-correct.java
|
||||||
|
|
||||||
builtin_patterns="bibtex html java objc pascal php python ruby tex"
|
builtin_patterns="bibtex cpp html java objc pascal php python ruby tex"
|
||||||
for p in $builtin_patterns
|
for p in $builtin_patterns
|
||||||
do
|
do
|
||||||
test_expect_success "builtin $p pattern compiles" '
|
test_expect_success "builtin $p pattern compiles" '
|
||||||
|
|
Loading…
Reference in New Issue