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

Re: [PATCH 2/2] commit: use a priority queue in merge base functions

From
Jeff King <peff@peff.net>
Date
Aug 30, 2012, 13:03 UTC
Message-ID
<20120830130327.GB5687@sigill.intra.peff.net>
In-Reply-To
<20120830125421.GA5687@sigill.intra.peff.net>
On Thu, Aug 30, 2012 at 08:54:21AM -0400, Jeff King wrote:
Show 10 quoted lines
> On Wed, Aug 29, 2012 at 05:05:40PM -0400, Jeff King wrote:
> 
> > You would want this on top:
> > [...]
> > but t6024 still fails (it clearly is finding a different merge base than
> > the test expects).  I'll trace through it, but it will have to be later
> > tonight.
> 
> The problem in t6024 is caused by the fact that the commit timestamps
> for every commit are identical.

So I was able to have my queue behave just like commit_list by fixing the stability issue. But I still have no clue what is going on in t6024. It does this for each commit it makes:

  [...]
  GIT_AUTHOR_DATE="2006-12-12 23:00:00" git commit -m 1 a1 &&
  [...]
  GIT_AUTHOR_DATE="2006-12-12 23:00:01" git commit -m A a1 &&
  [...]

which is just bizarre. At first I thought it was buggy, and that it really wanted to be setting COMMITTER_DATE (in which case it should really just be using test_tick, anyway). But if you do that, the test fails (even using a regular commit_list)!

So is the test buggy? Or are the identical commit timestamps part of the intended effect? I can't see how that would be, since:

  1. You would need to set COMMITTER_DATE for that anyway, as you are
     otherwise creating a race condition.
  2. Why would you set AUTHOR_DATE? It's not used by the merge code at
     all.
The script originally comes from here:
  http://thread.gmane.org/gmane.comp.version-control.git/33566/focus=33852

and the discussion implies that the AUTHOR_DATEs were added to avoid a race condition with the timestamps. But why would that ever have worked?

Confused...
-Peff
Previous: Jeff KingNext: Jeff King
Message 19 of 27 in “optimize fast-forward checks”
  1. 0/5 optimize fast-forward checksJunio C Hamano, Aug 27, 2012
  2. 1/5 in_merge_bases(): support only one "other" commitJunio C Hamano, Aug 27, 2012
  3. 2/5 receive-pack: use in_merge_bases() for fast-forward checkJunio C Hamano, Aug 27, 2012
  4. 3/5 http-push: use in_merge_bases() for fast-forward checkJunio C Hamano, Aug 27, 2012
  5. 4/5 in_merge_bases(): omit unnecessary redundant common ancestor reductionJunio C Hamano, Aug 27, 2012
  6. 5/5 (BROKEN) get_merge_bases_many(): walk from many tips in parallelJunio C Hamano, Aug 27, 2012
  7. Junio C HamanoAug 28, 2012
  8. Junio C HamanoAug 28, 2012
  9. Junio C HamanoAug 28, 2012
  10. Jeff KingAug 29, 2012
  11. 1/2 basic priority queue implementationJeff King, Aug 29, 2012
  12. 2/2 commit: use a priority queue in merge base functionsJeff King, Aug 29, 2012
  13. Junio C HamanoAug 29, 2012
  14. Jeff KingAug 29, 2012
  15. Jeff KingAug 29, 2012
  16. Jeff KingAug 29, 2012
  17. Jeff KingAug 29, 2012
  18. Jeff KingAug 30, 2012
  19. Jeff KingAug 30, 2012
  20. Jeff KingAug 30, 2012
  21. Junio C HamanoAug 30, 2012
  22. Jeff KingAug 30, 2012
  23. Junio C HamanoAug 30, 2012
  24. Junio C HamanoAug 30, 2012
  25. Jeff KingAug 30, 2012
  26. Junio C HamanoAug 30, 2012
  27. Junio C HamanoAug 29, 2012

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.