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

[RFC PATCH 0/1] dir: consider worktree config in path recursion

From
GGGoss Geppert <gg.oss.dev@gmail.com>
Date
May 5, 2022, 20:32 UTC
Message-ID
<20220505203234.21586-1-ggossdev@gmail.com>

Please see the commit message for a description. Effectively, since 8d92fb2927 (dir: replace exponential algorithm with a linear one, 2020-04-01) the following no longer does what it used to do:

``` test_repo="$(mktemp -d /tmp/git-test-XXXXXXX)" cd "$test_repo"

>test-file

git init git config core.worktree /tmp git add test-file ```

In terms of desired behavior, it seems that if it is possible to track files that are outside the default worktree, then it should also be possible to track files inside the default worktree location. Personally, I was using this setup to track dotfiles and some other system related snippets and liked that design more than alternatives I'm aware of. I ran into this problem because I was recently unable to add a file to an existing repository with this configuration.

There are a couple open items but I wanted to get some feedback to confirm that the behavior of this patch is desirable or if I'm overlooking something entirely.

TODOs: [ ] add test [ ] add signoffs

Goss Geppert (1):
  dir: consider worktree config in path recursion
 dir.c | 37 ++++++++++++++++++++++++++++++-------
 1 file changed, 30 insertions(+), 7 deletions(-)
base-commit: 0f828332d5ac36fc63b7d8202652efa152809856
-- 
2.36.0
Next: Goss Geppert
Message 1 of 31 in “dir: consider worktree config in path recursion”
  1. 0/1 dir: consider worktree config in path recursionGoss Geppert, May 5, 2022
  2. 1/1 dir: consider worktree config in path recursionGoss Geppert, May 5, 2022
  3. Elijah NewrenMay 7, 2022
  4. oss devMay 7, 2022
  5. Junio C HamanoMay 6, 2022
  6. oss devMay 6, 2022
  7. 0/2 dir: consider worktree config in path recursionGoss Geppert, May 10, 2022
  8. 1/2 dir: consider worktree config in path recursionGoss Geppert, May 10, 2022
  9. Junio C HamanoMay 11, 2022
  10. oss devMay 20, 2022
  11. Elijah NewrenMay 24, 2022
  12. Junio C HamanoMay 24, 2022
  13. Elijah NewrenMay 25, 2022
  14. Junio C HamanoMay 11, 2022
  15. oss devMay 20, 2022
  16. Derrick StoleeMay 23, 2022
  17. oss devMay 30, 2022
  18. 2/2 dir: minor refactoring / clean-upGoss Geppert, May 10, 2022
  19. Junio C HamanoMay 11, 2022
  20. oss devMay 20, 2022
  21. 0/3 dir: traverse into repositoryGoss Geppert, May 20, 2022
  22. 1/3 dir: traverse into repositoryGoss Geppert, May 20, 2022
  23. 3/3 dir: minor refactoring / clean-upGoss Geppert, May 20, 2022
  24. 2/3 dir: cache git_dir's realpathGoss Geppert, May 20, 2022
  25. Elijah NewrenMay 24, 2022
  26. 0/2 dir: traverse into repositoryGoss Geppert, Jun 16, 2022
  27. Elijah NewrenJun 22, 2022
  28. 0/2 dir: traverse into repository (resending)Goss Geppert, Jun 16, 2022
  29. 1/2 dir: traverse into repositoryGoss Geppert, Jun 16, 2022
  30. 1/2 dir: traverse into repositoryGoss Geppert, Jun 16, 2022
  31. 2/2 dir: minor refactoring / clean-upGoss Geppert, Jun 16, 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.