Skip to content

Commit fd75166

Browse files
author
Junio C Hamano
committed
git-log (internal): add approxidate.
Next will be the pretty-print format. Signed-off-by: Junio C Hamano <[email protected]>
1 parent 765ac8e commit fd75166

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

revision.c

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,26 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
492492
revs->limited = 1;
493493
continue;
494494
}
495+
if (!strncmp(arg, "--since=", 8)) {
496+
revs->max_age = approxidate(arg + 8);
497+
revs->limited = 1;
498+
continue;
499+
}
500+
if (!strncmp(arg, "--after=", 8)) {
501+
revs->max_age = approxidate(arg + 8);
502+
revs->limited = 1;
503+
continue;
504+
}
505+
if (!strncmp(arg, "--before=", 9)) {
506+
revs->min_age = approxidate(arg + 9);
507+
revs->limited = 1;
508+
continue;
509+
}
510+
if (!strncmp(arg, "--until=", 8)) {
511+
revs->min_age = approxidate(arg + 8);
512+
revs->limited = 1;
513+
continue;
514+
}
495515
if (!strcmp(arg, "--all")) {
496516
handle_all(revs, flags);
497517
continue;

0 commit comments

Comments
 (0)