git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/2] git-log (internal): add approxidate.

From
Junio C Hamano <junkio@cox.net>
Date
Mar 1, 2006, 12:24 UTC
Message-ID
<7vhd6igxol.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.64.0602281504280.22647@g5.osdl.org>
Next will be the pretty-print format.
Signed-off-by: Junio C Hamano <junkio@cox.net>
---
  Linus Torvalds <torvalds@osdl.org> writes:
  > I didn't add the logic for --before/--after flags, but that should be 
  > pretty trivial, and is independent of this anyway.
  >
  > Perhaps more importantly, I didn't remove the tests that now start 
  > failing, nor did I remove the actual code to do --merge-order ;/
  I've done the janitorial, and have two more on top.  Here is the
  first one.  I'd appreciate comments on the second one.
 revision.c |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)
2eba658eaffdf4c5c9d0767b49e4c27d7281cda6
diff --git a/revision.c b/revision.c
index c84f146..4885871 100644
--- a/revision.c
+++ b/revision.c
@@ -492,6 +492,26 @@ int setup_revisions(int argc, const char
 				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;
-- 
1.2.3.g9425
Previous: Linus TorvaldsNext: Junio C Hamano
Message 8 of 13 in “git-rev-list libification effort: the next stage”
  1. 0/3 git-rev-list libification effort: the next stageLinus Torvalds, Feb 28, 2006
  2. 1/3 git-rev-list libification: rev-list walkingLinus Torvalds, Feb 28, 2006
  3. 2/3 Introduce trivial new pager.c helper infrastructureLinus Torvalds, Feb 28, 2006
  4. 3/3 Tie it all together: "git log"Linus Torvalds, Feb 28, 2006
  5. Linus TorvaldsFeb 28, 2006
  6. Junio C HamanoFeb 28, 2006
  7. Linus TorvaldsFeb 28, 2006
  8. 1/2 git-log (internal): add approxidate.Junio C Hamano, Mar 1, 2006
  9. 2/2 git-log (internal): more options.Junio C Hamano, Mar 1, 2006
  10. Linus TorvaldsMar 1, 2006
  11. Junio C HamanoMar 1, 2006
  12. Martin LanghoffFeb 28, 2006
  13. Junio C HamanoMar 1, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.