threads / discuss / 27201

Difference between --date-order and reverse chronological order?

Subject: Difference between --date-order and reverse chronological order?

## tl;dr

3 messages between Apr 27, 2011 and Apr 27, 2011.

replies: 2people: 3as markdown or json

Dun Peal· Apr 27, 2011, 15:15 UTC · lore
Hi.
The git-log manpage defines --date-order:

"This option is similar to --topo-order in the sense that no parent comes before all of its children, but otherwise things are still ordered in the commit timestamp order."

But by Git's definition, for a child commit to be created, its parent must already exist. So even in reverse chronological order, all parents should come after all their children, no?

Thanks, D.
Junio C Hamano· Apr 27, 2011, 17:36 UTC · re: Dun Peal · lore

Re: Difference between --date-order and reverse chronological order?

Dun Peal <dunpealer@gmail.com> writes:
> But by Git's definition, for a child commit to be created, its parent
> must already exist. So even in reverse chronological order, all
> parents should come after all their children, no?

I think "distributed" and "your clock may be skewed" would solve that puzzlement ;-)

Johannes Sixt· Apr 27, 2011, 19:39 UTC · re: Junio C Hamano · lore

Re: Difference between --date-order and reverse chronological order?

Am 27.04.2011 19:36, schrieb Junio C Hamano:
Show 8 quoted lines
> Dun Peal <dunpealer@gmail.com> writes:
> 
>> But by Git's definition, for a child commit to be created, its parent
>> must already exist. So even in reverse chronological order, all
>> parents should come after all their children, no?
> 
> I think "distributed" and "your clock may be skewed" would solve that
> puzzlement ;-)
Are you saying that given this history:
      E----D
    /     /
   A--B--C
* we can get D-C-B-E-A or D-E-C-B-A with --topo-order
* we can get the above plus D-C-E-B-A with --date-order
* and with neither --topo-order nor --date-order we can also get
D-E-A-C-B or D-C-B-A-E if there was sufficient clock skew when the
commits were created. How would such a clock skew have looked like?
-- Hannes

← back to recent threads