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

Re: [RFC PATCH 1/1] mv: integrate with sparse-index

From
Derrick Stolee <derrickstolee@github.com>
Date
Mar 23, 2022, 13:10 UTC
Message-ID
<e61303b8-10ad-5b5b-d48b-cac89ac53d29@github.com>
In-Reply-To
<CAJyCBORkauHAdDiHjQ2Agj3bNhLNPtKk-VW5=bNmBfNuQtv7hA@mail.gmail.com>
On 3/22/2022 4:38 AM, Shaoxuan Yuan wrote:
Show 15 quoted lines
> Hi all,
> 
> On Tue, Mar 22, 2022 at 3:45 AM Derrick Stolee <derrickstolee@github.com> wrote:
>> I'm particularly surprised in how much 'git mv' doesn't work very
>> well in the sparse-checkout environment already, which makes things
>> more difficult than "just" doing the normal sparse index things.
>>
>> It's good that we are discovering them and working to fix them.
>>
>> Thanks,
>> -Stolee
> 
> Really appreciate the mentoring and tips here, I'm trying to make some progress
> now. The problems facing here certainly push me to explore more and know
> better about the codebase. Appreciate all the help :-)

A thought occurred to me while thinking about these difficulties: perhaps it is better to start with 'git rm' since that does only half of what 'git mv' does. It should be a smaller lift as a first contribution. There is even a clear loop that is marked with "TODO: audit for interaction with sparse-index."

As we've discovered in this thread, the direction for integrating a builtin with the sparse index should follow this outline:

0. Test the builtin in t1092 with interactions inside and outside
   of the sparse-checkout cone.*
1. Add command_requires_full_index = 0 line to the builtin.
2. Check for failures and diagnose them.
3. Check for index expansion and remove them as necessary.
   (Go back to 2.)
4. Run performance tests.
(*) This step is the one we failed to focus enough on previously.

Of course, if you've already gotten really far on 'mv' and don't want to switch context, then keep at it.

Thanks, -Stolee

Previous: Shaoxuan YuanNext: Junio C Hamano
Message 17 of 22 in “mv: integrate with sparse-index”
  1. 0/1 mv: integrate with sparse-indexShaoxuan Yuan, Mar 15, 2022
  2. 1/1 mv: integrate with sparse-indexShaoxuan Yuan, Mar 15, 2022
  3. Victoria DyeMar 15, 2022
  4. Derrick StoleeMar 15, 2022
  5. Shaoxuan YuanMar 16, 2022
  6. Shaoxuan YuanMar 17, 2022
  7. Shaoxuan YuanMar 16, 2022
  8. Shaoxuan YuanMar 16, 2022
  9. Derrick StoleeMar 16, 2022
  10. Shaoxuan YuanMar 16, 2022
  11. Victoria DyeMar 17, 2022
  12. Junio C HamanoMar 18, 2022
  13. Derrick StoleeMar 21, 2022
  14. Junio C HamanoMar 21, 2022
  15. Derrick StoleeMar 21, 2022
  16. Shaoxuan YuanMar 22, 2022
  17. Derrick StoleeMar 23, 2022
  18. Junio C HamanoMar 23, 2022
  19. Shaoxuan YuanMar 27, 2022
  20. Derrick StoleeMar 28, 2022
  21. Junio C HamanoMar 15, 2022
  22. Derrick StoleeMar 15, 2022

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.