git-log (internal): add approxidate.
authorJunio C Hamano <junkio@cox.net>
Wed, 1 Mar 2006 08:12:37 +0000 (00:12 -0800)
committerJunio C Hamano <junkio@cox.net>
Wed, 1 Mar 2006 11:16:34 +0000 (03:16 -0800)
Next will be the pretty-print format.

Signed-off-by: Junio C Hamano <junkio@cox.net>
revision.c

index c84f14609be4a2ef359eb472d29bc527fad9b680..48858714250da8e7328c132f60dfcd076d103433 100644 (file)
@@ -492,6 +492,26 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
                                revs->limited = 1;
                                continue;
                        }
+                       if (!strncmp(arg, "--since=", 8)) {
+                               revs->max_age = approxidate(arg + 8);
+                               revs->limited = 1;
+                               continue;
+                       }
+                       if (!strncmp(arg, "--after=", 8)) {
+                               revs->max_age = approxidate(arg + 8);
+                               revs->limited = 1;
+                               continue;
+                       }
+                       if (!strncmp(arg, "--before=", 9)) {
+                               revs->min_age = approxidate(arg + 9);
+                               revs->limited = 1;
+                               continue;
+                       }
+                       if (!strncmp(arg, "--until=", 8)) {
+                               revs->min_age = approxidate(arg + 8);
+                               revs->limited = 1;
+                               continue;
+                       }
                        if (!strcmp(arg, "--all")) {
                                handle_all(revs, flags);
                                continue;