Skip to content

Commit ad9d8e8

Browse files
committed
Merge branch 'maint'
* maint: t0006: test timezone parsing rerere.txt: Document forget subcommand Documentation/git-gc.txt: add reference to githooks
2 parents 16adc7c + 6b09778 commit ad9d8e8

File tree

4 files changed

+22
-6
lines changed

4 files changed

+22
-6
lines changed

Documentation/git-gc.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,13 @@ If you are expecting some objects to be collected and they aren't, check
137137
all of those locations and decide whether it makes sense in your case to
138138
remove those references.
139139

140+
HOOKS
141+
-----
142+
143+
The 'git gc --auto' command will run the 'pre-auto-gc' hook. See
144+
linkgit:githooks[5] for more information.
145+
146+
140147
SEE ALSO
141148
--------
142149
linkgit:git-prune[1]

Documentation/git-rerere.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ git-rerere - Reuse recorded resolution of conflicted merges
77

88
SYNOPSIS
99
--------
10-
'git rerere' ['clear'|'diff'|'status'|'gc']
10+
'git rerere' ['clear'|'forget' [<pathspec>]|'diff'|'status'|'gc']
1111

1212
DESCRIPTION
1313
-----------
@@ -40,6 +40,11 @@ This resets the metadata used by rerere if a merge resolution is to be
4040
aborted. Calling 'git am [--skip|--abort]' or 'git rebase [--skip|--abort]'
4141
will automatically invoke this command.
4242

43+
'forget' <pathspec>::
44+
45+
This resets the conflict resolutions which rerere has recorded for the current
46+
conflict in <pathspec>. The <pathspec> is optional.
47+
4348
'diff'::
4449

4550
This displays diffs for the current state of the resolution. It is

t/t0006-date.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ check_show 31449600 '12 months ago'
2828

2929
check_parse() {
3030
echo "$1 -> $2" >expect
31-
test_expect_${3:-success} "parse date ($1)" "
32-
test-date parse '$1' >actual &&
31+
test_expect_${4:-success} "parse date ($1${3:+ TZ=$3})" "
32+
TZ=${3:-$TZ} test-date parse '$1' >actual &&
3333
test_cmp expect actual
3434
"
3535
}
@@ -38,6 +38,7 @@ check_parse 2008 bad
3838
check_parse 2008-02 bad
3939
check_parse 2008-02-14 bad
4040
check_parse '2008-02-14 20:30:45' '2008-02-14 20:30:45 +0000'
41+
check_parse '2008-02-14 20:30:45 -0500' '2008-02-14 20:30:45 -0500'
4142

4243
check_approxidate() {
4344
echo "$1 -> $2 +0000" >expect

test-date.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,15 @@ static void parse_dates(char **argv, struct timeval *now)
2121
for (; *argv; argv++) {
2222
char result[100];
2323
time_t t;
24+
int tz;
2425

2526
result[0] = 0;
2627
parse_date(*argv, result, sizeof(result));
27-
t = strtoul(result, NULL, 0);
28-
printf("%s -> %s\n", *argv,
29-
t ? show_date(t, 0, DATE_ISO8601) : "bad");
28+
if (sscanf(result, "%ld %d", &t, &tz) == 2)
29+
printf("%s -> %s\n",
30+
*argv, show_date(t, tz, DATE_ISO8601));
31+
else
32+
printf("%s -> bad\n", *argv);
3033
}
3134
}
3235

0 commit comments

Comments
 (0)