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

in_merge_bases() is too expensive for recent "pu" update

From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Date
Aug 23, 2012, 12:32 UTC
Message-ID
<CACsJy8C-VxzwigyUDHnUkXN7vhB+93X96pH9MvgB0ps7v-_NmQ@mail.gmail.com>

I just did a "git fetch". It took 19 seconds (measured with gettimeofday) to finish in_merge_bases() in update_local_ref() in fetch.c, just to print this line

 + a4f2db3...b95a282 pu         -> origin/pu  (forced update)

It's partly my fault because I'm on gcc -O0. But should it not take that much time for one line? As a grumpy user, I'd be perfectly ok with git saying "probably forced update, check it yourself" if the spent time exceeds half a second. On the same token, if diffstat takes too long for git-pull, then perhaps just stop and print "do it yourself".

-- 
Duy
Next: Thomas Rast
Message 1 of 16 in “in_merge_bases() is too expensive for recent "pu" update”
  1. Nguyen Thai Ngoc DuyAug 23, 2012
  2. Thomas RastAug 23, 2012
  3. Junio C HamanoAug 23, 2012
  4. Junio C HamanoAug 23, 2012
  5. Junio C HamanoAug 23, 2012
  6. Thomas RastAug 24, 2012
  7. Junio C HamanoAug 24, 2012
  8. Thomas RastAug 24, 2012
  9. Jeff KingAug 24, 2012
  10. Junio C HamanoAug 24, 2012
  11. Junio C HamanoAug 24, 2012
  12. Nguyen Thai Ngoc DuyAug 24, 2012
  13. Nguyen Thai Ngoc DuyAug 24, 2012
  14. Junio C HamanoAug 28, 2012
  15. Thomas RastAug 28, 2012
  16. Junio C HamanoAug 28, 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.