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

Re: [PATCH v4 0/2] dir: traverse into repository

From
Elijah Newren <newren@gmail.com>
Date
Jun 22, 2022, 04:57 UTC
Message-ID
<CABPp-BExinbGArOQQTkyPWz-KhJL7T6D0fsvP88quv-TM=zF3A@mail.gmail.com>
In-Reply-To
<DM6PR13MB29876A53962557131120EF619DAC9@DM6PR13MB2987.namprd13.prod.outlook.com>
On Thu, Jun 16, 2022 at 4:20 PM Goss Geppert <gg.oss@outlook.com> wrote:
Show 62 quoted lines
>
> From: Goss Geppert <ggossdev@gmail.com>
>
> This latest version of the patch series contains relatively minor
> modifications relative to the previous version.  Let me know if there
> is anything else I need to do.
>
> Changes compared to v3:
> * remove the commit that caches the gitdir's realpath as this was deemed
>   a premature optimization given the amount of code churn
> * use git option `-C` in some of the testcases to avoid creating a
>   subshell
>
> Goss Geppert (2):
>   dir: traverse into repository
>   dir: minor refactoring / clean-up
>
>  dir.c                          |  35 ++++-
>  t/t2205-add-worktree-config.sh | 265 +++++++++++++++++++++++++++++++++
>  2 files changed, 293 insertions(+), 7 deletions(-)
>  create mode 100755 t/t2205-add-worktree-config.sh
>
> Range-diff against v3:
> 1:  0fc8886f1e ! 1:  f84cefe731 dir: traverse into repository
>     @@ t/t2205-add-worktree-config.sh (new)
>      +  (
>      +  cd test1 &&
>      +  local parent_dir="$(pwd)" &&
>     -+  (
>     -+          cd repo &&
>     -+          git ls-files -o --exclude-standard "$parent_dir" >../actual-all-unsorted
>     -+  ) &&
>     ++  git -C repo ls-files -o --exclude-standard "$parent_dir" >actual-all-unsorted &&
>      +  sort actual-all-unsorted >actual-all &&
>      +  sort expect-all-unsorted >expect-all &&
>      +  test_cmp expect-all actual-all
>     @@ t/t2205-add-worktree-config.sh (new)
>      +  (
>      +  cd test1 &&
>      +  local parent_dir="$(pwd)" &&
>     -+  (
>     -+          cd repo &&
>     -+          git ls-files -o --directory --exclude-standard "$parent_dir" >../actual-all-dir-unsorted
>     -+  ) &&
>     ++  git -C repo ls-files -o --directory --exclude-standard "$parent_dir" >actual-all-dir-unsorted &&
>      +  sort actual-all-dir-unsorted >actual-all &&
>      +  sort expect-all-dir-unsorted >expect-all &&
>      +  test_cmp expect-all actual-all
>     @@ t/t2205-add-worktree-config.sh (new)
>      +  (
>      +  cd test1 &&
>      +  local parent_dir="$(pwd)" &&
>     -+  (
>     -+          cd repo &&
>     -+          git ls-files -o --exclude-standard "$parent_dir" >../actual-untracked-unsorted
>     -+  ) &&
>     ++  git -C repo ls-files -o --exclude-standard "$parent_dir" >actual-untracked-unsorted &&
>      +  sort actual-untracked-unsorted >actual-untracked &&
>      +  sort expect-untracked-unsorted >expect-untracked &&
>      +  test_cmp expect-untracked actual-untracked
> 2:  a80cbd5517 < -:  ---------- dir: cache git_dir's realpath
> 3:  899c69300c = 2:  d4ff1bd40a dir: minor refactoring / clean-up
Thanks, this version looks good to me.
Reviewed-by: Elijah Newren <newren@gmail.com>
Previous: Goss GeppertNext: Goss Geppert
Message 27 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.