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

Re: [PATCH 1/2] t/perf: time rev-list with UNINTERESTING commits

From
Jeff King <peff@peff.net>
Date
Jan 20, 2014, 22:39 UTC
Message-ID
<20140120223936.GA2350@sigill.intra.peff.net>
In-Reply-To
<87ppnmb7yr.fsf@thomasrast.ch>
On Mon, Jan 20, 2014 at 11:32:12PM +0100, Thomas Rast wrote:
Show 8 quoted lines
> > This is bad to be touching the repo and assuming it is non-bare. For
> > some reason I assumed that the perf suite made a copy of the repo, but
> > it doesn't. If you point to a bare repo via GIT_PERF_REPO, this part of
> > the test fails.
> 
> It does make a copy, but with cp -Rl.  I haven't actually ever tried
> what happens if you point it at a bare though.  It *should* fail because
> it tries to cd $repo/.git, but if that was itself bare...

Oh, hmph. I checked my linux repo, which I had used as GIT_PERF_REPO, and noticed that it had the test commit in its reflog. But I forgot that is because I did the test manually there right before writing up the t/perf script! So yes, it copies, and it's totally fine to be modifying the repo.

Bare repos seem to work just fine for me. It looks like we use `git rev-parse --git-dir` to get the source, and then copy that to `.git` in the temporary directory. So that works fine either way, and we do have a directory available as the working dir. But of course the config from the bare repo says `core.bare = true`, so some commands will bail.

We could perhaps just set GIT_WORK_TREE in the perf scripts, which I believe would override the bare setting in the .git/config. And then we know the repos will be consistently non-bare.

Whether we do that or not, I think the update I posted is preferable, as it reproduces the problem in a much simpler manner.

-Peff
Previous: Thomas RastNext: Jeff King
Message 5 of 13 in “performance regression in mark_edges_uninteresting”
  1. 0/2 performance regression in mark_edges_uninterestingJeff King, Jan 20, 2014
  2. 1/2 t/perf: time rev-list with UNINTERESTING commitsJeff King, Jan 20, 2014
  3. Jeff KingJan 20, 2014
  4. Thomas RastJan 20, 2014
  5. Jeff KingJan 20, 2014
  6. 2/2 list-objects: only look at cmdline trees with edge_hintJeff King, Jan 20, 2014
  7. Duy NguyenJan 20, 2014
  8. Jeff KingJan 21, 2014
  9. Jeff KingJan 20, 2014
  10. 0/2 performance regression in mark_edges_uninterestingJeff King, Jan 21, 2014
  11. 1/2 t/perf: time rev-list with UNINTERESTING commitsJeff King, Jan 21, 2014
  12. 2/2 list-objects: only look at cmdline trees with edge_hintJeff King, Jan 21, 2014
  13. Junio C HamanoJan 21, 2014

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.