# rev-list date-order not overridable

2 messages from 2008-04-10 to 2008-04-10. Participants: Jan Engelhardt, Michele Ballabio.
Thread: https://gitlist.dev/t/13047

## Jan Engelhardt, 2008-04-10 11:43

Subject: rev-list date-order not overridable
Message-ID: <alpine.LNX.1.10.0804101342090.8765@fbirervta.pbzchgretzou.qr>
URL: https://gitlist.dev/e/alpine.LNX.1.10.0804101342090.8765%40fbirervta.pbzchgretzou.qr

```
Hi,


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.

```

## Michele Ballabio, 2008-04-10 20:06

Subject: [PATCH] revision.c: make --date-order overriddable
Message-ID: <200804102206.52464.barra_cuda@katamail.com>
URL: https://gitlist.dev/e/200804102206.52464.barra_cuda%40katamail.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

```
