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

Re: rc4 - make quick-install-doc is broken

From
Mark Levedahl <mlevedahl@gmail.com>
Date
Aug 4, 2007, 20:45 UTC
Message-ID
<46B4E582.7030200@gmail.com>
In-Reply-To
<46B4DF39.2070506@lsrfire.ath.cx>
René Scharfe wrote:
Show 11 quoted lines
> Mark Levedahl schrieb:
>   
>> git>git bisect good
>> 6490a3383f1d0d96c122069e510ef1af1d019fbb is first bad commit
>>     
>
> I've started a bisect run myself and ended up at a different commit,
> viz. e90fdc39b6903502192b2dd11e5503cea721a1ad ("Clean up work-tree
> handling").  Hmm.  I guess this candidate has a greater chance of
> actually being the culprit than yours. ;-)
>   

Nak - at commit e90fdc... it works fine for me here. However, one problem is the following lines in setup.c/set_work_tree() that appear until 6490a3

            strncpy(dir_buffer, dir, len - postfix_len);
        /* are we inside the default work tree? */
        rel = get_relative_cwd(buffer, sizeof(buffer), dir_buffer);

Note that dir_buffer is not null terminated in the above code, that bug has been around for a while, and you certainly could run into a different problem than I did as the results are essentially undefined here because of that bug.. The key innovation for the current discussion in commit 6490a33 is that dir_buffer is null terminated after the copy, causing a different but repeatable result from get_relative_cwd.

I think this ultimately exposes a bug in builtin-checkout-index/checkout_all wherein the latter does not explicitly honor the given --prefix option that is passed along in state. Specifically, on each pass the following test passes

        if (prefix && *prefix &&
            (ce_namelen(ce) <= prefix_length ||
             memcmp(prefix, ce->name, prefix_length)))
            continue;

so the code never attempts to write the file out. I cannot fathom what this test is trying to discern and have to leave it to others more familiar with the design to figure out the right course. For this particular use, the passed in prefix is irrelevant, the correct path to write to is in state.

Mark
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 31 of 36 in “rc4 - make quick-install-doc is broken”
  1. Mark LevedahlAug 4, 2007
  2. Johannes SchindelinAug 4, 2007
  3. Mark LevedahlAug 4, 2007
  4. Johannes SchindelinAug 4, 2007
  5. Mark LevedahlAug 4, 2007
  6. Johannes SchindelinAug 4, 2007
  7. Mark LevedahlAug 4, 2007
  8. Fix quick-install-docJohannes Schindelin, Aug 4, 2007
  9. René ScharfeAug 4, 2007
  10. Fix install-doc-quick targetJunio C Hamano, Aug 5, 2007
  11. Johannes SchindelinAug 5, 2007
  12. Junio C HamanoAug 5, 2007
  13. Johannes SchindelinAug 5, 2007
  14. Johannes SchindelinAug 5, 2007
  15. (Really) Fix install-doc-quick targetMark Levedahl, Aug 6, 2007
  16. Johannes SchindelinAug 6, 2007
  17. Junio C HamanoAug 6, 2007
  18. Mark LevedahlAug 6, 2007
  19. Johannes SchindelinAug 6, 2007
  20. Mark LevedahlAug 6, 2007
  21. Junio C HamanoAug 7, 2007
  22. Mark LevedahlAug 7, 2007
  23. Junio C HamanoAug 7, 2007
  24. René ScharfeAug 7, 2007
  25. Johannes SchindelinAug 7, 2007
  26. Mark LevedahlAug 4, 2007
  27. Johannes SchindelinAug 4, 2007
  28. Mark LevedahlAug 4, 2007
  29. René ScharfeAug 4, 2007
  30. Johannes SchindelinAug 4, 2007
  31. Mark LevedahlAug 4, 2007
  32. Johannes SchindelinAug 4, 2007
  33. René ScharfeAug 4, 2007
  34. Johannes SchindelinAug 4, 2007
  35. Johannes SchindelinAug 4, 2007
  36. René ScharfeAug 4, 2007

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.