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

Re: identical hashes on two branches, but holes in git log

From
PMPhilippe De Muyter <phdm@macq.eu>
Date
May 21, 2015, 07:05 UTC
Message-ID
<20150521070523.GA8026@frolo.macqel>
In-Reply-To
<20150520161815.GA12521@peff.net>
On Wed, May 20, 2015 at 12:18:15PM -0400, Jeff King wrote:
Show 23 quoted lines
> On Wed, May 20, 2015 at 04:12:38PM +0200, Philippe De Muyter wrote:
> 
> > After reading the man page of 'git log', should --topo-order not be the
> > default log order ?
> 
> The problem with --topo-order is that it has to traverse all of the
> commits before starting output. So:
> 
>   $ time git log | head -1
>   commit 64fb1d0e975e92e012802d371e417266d6531676
> 
>   real    0m0.038s
>   user    0m0.032s
>   sys     0m0.008s
> 
>   $ time git log --topo-order | head -1
>   commit 64fb1d0e975e92e012802d371e417266d6531676
> 
>   real    0m4.247s
>   user    0m4.140s
>   sys     0m0.108s
> 
> -Peff
So we trade correctness for speed :(
Is there a way to set topo-order as the default log order via git config ?

Is topo-order already implemented as starting with the default order followed by an ancestor check or does it switch immediately to topological sort ?

Philippe
Previous: Jeff KingNext: Junio C Hamano
Message 14 of 15 in “identical hashes on two branches, but holes in git log”
  1. Philippe De MuyterMay 19, 2015
  2. Junio C HamanoMay 19, 2015
  3. Philippe De MuyterMay 19, 2015
  4. Junio C HamanoMay 19, 2015
  5. Philippe De MuyterMay 21, 2015
  6. Philip OakleyMay 21, 2015
  7. Philippe De MuyterMay 21, 2015
  8. Christian CouderMay 20, 2015
  9. Jeff KingMay 19, 2015
  10. Philippe De MuyterMay 20, 2015
  11. John KeepingMay 20, 2015
  12. Philippe De MuyterMay 20, 2015
  13. Jeff KingMay 20, 2015
  14. Philippe De MuyterMay 21, 2015
  15. Junio C HamanoMay 21, 2015

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.