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

[PATCH] revision.c: make --date-order overriddable

From
Michele Ballabio <barra_cuda@katamail.com>
Date
Apr 10, 2008, 20:06 UTC
Message-ID
<200804102206.52464.barra_cuda@katamail.com>
In-Reply-To
<alpine.LNX.1.10.0804101342090.8765@fbirervta.pbzchgretzou.qr>

Jan Engelhardt noticed that while --topo-order can be overridden by a subsequent --date-order, the reverse was not possible. That's because setup_revisions() failed to set revs->lifo properly.

Signed-off-by: Michele Ballabio <barra_cuda@katamail.com>
---
On Thursday 10 April 2008, Jan Engelhardt wrote:
> git-rev-list --topo-order (the default) can be overriden by specifying 
> --date-order, but --date-order cannot be overriden by passing in 
> --topo-order again. Having it work would be really nice because it 
> allows extra programs to default to --date-order in some way.
This should do.
 revision.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/revision.c b/revision.c
index 196fedc..ffbed3f 100644
--- a/revision.c
+++ b/revision.c
@@ -1083,6 +1083,7 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
 				continue;
 			}
 			if (!strcmp(arg, "--topo-order")) {
+				revs->lifo = 1;
 				revs->topo_order = 1;
 				continue;
 			}
-- 
1.5.5
Previous: Jan Engelhardt
Message 2 of 2 in “rev-list date-order not overridable”
  1. Jan EngelhardtApr 10, 2008
  2. revision.c: make --date-order overriddableMichele Ballabio, Apr 10, 2008

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.