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

Re: [PATCH 02/17] dir: convert create_simplify to use the pathspec struct interface

From
BWBrandon Williams <bmwill@google.com>
Date
Dec 9, 2016, 19:23 UTC
Message-ID
<20161209192316.GB88637@google.com>
In-Reply-To
<CACsJy8Cc6hE1Rbqjrc93xDMc0UUm0yMh0A-fyu3dfJ2G1jhENQ@mail.gmail.com>
On 12/09, Duy Nguyen wrote:
Show 29 quoted lines
> On Fri, Dec 9, 2016 at 1:19 AM, Brandon Williams <bmwill@google.com> wrote:
> > On 12/08, Duy Nguyen wrote:
> >> On Thu, Dec 8, 2016 at 7:03 AM, Brandon Williams <bmwill@google.com> wrote:
> >> > On 12/07, Duy Nguyen wrote:
> >> >> On Wed, Dec 7, 2016 at 4:51 AM, Brandon Williams <bmwill@google.com> wrote:
> >> >> > Convert 'create_simplify()' to use the pathspec struct interface from
> >> >> > using the '_raw' entry in the pathspec.
> >> >>
> >> >> It would be even better to kill this create_simplify() and let
> >> >> simplify_away() handle struct pathspec directly.
> >> >>
> >> >> There is a bug in this code, that might have been found if we
> >> >> simpify_away() handled pathspec directly: the memcmp() in
> >> >> simplify_away() will not play well with :(icase) magic. My bad. If
> >> >> :(icase) is used, the easiest/safe way is simplify nothing. Later on
> >> >> maybe we can teach simplify_away() to do strncasecmp instead. We could
> >> >> ignore exclude patterns there too (although not excluding is not a
> >> >> bug).
> >> >
> >> > So are you implying that the simplify struct needs to be killed?  That
> >> > way the pathspec struct itself is being passed around instead?
> >>
> >> Yes. simplify struct was a thing when pathspec was an array of char *.
> >> At this point I think it can retire (when we have time to retire it)
> >
> > Alright, then for now I can leave this change as is and have a follow up
> > series that kills the simplify struct.
> 
> Do let me know if you decide to drop it, so I can put it back in my backlog.
K will do
-- 
Brandon Williams
Previous: Duy NguyenNext: Brandon Williams
Message 13 of 142 in “pathspec cleanup”
  1. 00/17 pathspec cleanupBrandon Williams, Dec 6, 2016
  2. 01/17 mv: convert to using pathspec struct interfaceBrandon Williams, Dec 6, 2016
  3. Duy NguyenDec 7, 2016
  4. Brandon WilliamsDec 8, 2016
  5. Duy NguyenDec 8, 2016
  6. Brandon WilliamsDec 8, 2016
  7. 02/17 dir: convert create_simplify to use the pathspec struct interfaceBrandon Williams, Dec 6, 2016
  8. Duy NguyenDec 7, 2016
  9. Brandon WilliamsDec 8, 2016
  10. Duy NguyenDec 8, 2016
  11. Brandon WilliamsDec 8, 2016
  12. Duy NguyenDec 9, 2016
  13. Brandon WilliamsDec 9, 2016
  14. Brandon WilliamsDec 13, 2016
  15. 03/17 dir: convert fill_directory to use the pathspec struct interfaceBrandon Williams, Dec 6, 2016
  16. Duy NguyenDec 7, 2016
  17. Brandon WilliamsDec 7, 2016
  18. 10/17 pathspec: simpler logic to prefix original pathspec elementsBrandon Williams, Dec 6, 2016
  19. Stefan BellerDec 6, 2016
  20. Brandon WilliamsDec 6, 2016
  21. 08/17 pathspec: remove unused variable from unsupported_magicBrandon Williams, Dec 6, 2016
  22. 09/17 pathspec: always show mnemonic and name in unsupported_magicBrandon Williams, Dec 6, 2016
  23. Duy NguyenDec 7, 2016
  24. Brandon WilliamsDec 7, 2016
  25. Duy NguyenDec 7, 2016
  26. Brandon WilliamsDec 7, 2016
  27. 16/17 pathspec: small readability changesBrandon Williams, Dec 6, 2016
  28. Stefan BellerDec 6, 2016
  29. Duy NguyenDec 7, 2016
  30. Brandon WilliamsDec 7, 2016
  31. Duy NguyenDec 8, 2016
  32. Duy NguyenDec 7, 2016
  33. Junio C HamanoDec 7, 2016
  34. Brandon WilliamsDec 7, 2016
  35. 13/17 pathspec: create parse_long_magic functionBrandon Williams, Dec 6, 2016
  36. 14/17 pathspec: create parse_element_magic helperBrandon Williams, Dec 6, 2016
  37. 11/17 pathspec: factor global magic into its own functionBrandon Williams, Dec 6, 2016
  38. Duy NguyenDec 7, 2016
  39. Brandon WilliamsDec 7, 2016
  40. Duy NguyenDec 8, 2016
  41. 12/17 pathspec: create parse_short_magic functionBrandon Williams, Dec 6, 2016
  42. 07/17 mv: small code cleanupBrandon Williams, Dec 6, 2016
  43. 06/17 pathspec: copy and free owned memoryBrandon Williams, Dec 6, 2016
  44. 04/17 ls-tree: convert show_recursive to use the pathspec struct interfaceBrandon Williams, Dec 6, 2016
  45. Duy NguyenDec 7, 2016
  46. Brandon WilliamsDec 7, 2016
  47. 05/17 pathspec: remove the deprecated get_pathspec functionBrandon Williams, Dec 6, 2016
  48. 17/17 pathspec: remove outdated commentBrandon Williams, Dec 6, 2016
  49. 15/17 pathspec: create strip submodule slash helpersBrandon Williams, Dec 6, 2016
  50. Junio C HamanoDec 7, 2016
  51. 00/16 pathspec cleanupBrandon Williams, Dec 8, 2016
  52. 01/16 mv: remove use of deprecated 'get_pathspec()'Brandon Williams, Dec 8, 2016
  53. 02/16 dir: convert create_simplify to use the pathspec struct interfaceBrandon Williams, Dec 8, 2016
  54. 03/16 dir: convert fill_directory to use the pathspec struct interfaceBrandon Williams, Dec 8, 2016
  55. 06/16 pathspec: copy and free owned memoryBrandon Williams, Dec 8, 2016
  56. 11/16 pathspec: create parse_short_magic functionBrandon Williams, Dec 8, 2016
  57. 10/16 pathspec: factor global magic into its own functionBrandon Williams, Dec 8, 2016
  58. 09/16 pathspec: simpler logic to prefix original pathspec elementsBrandon Williams, Dec 8, 2016
  59. 12/16 pathspec: create parse_long_magic functionBrandon Williams, Dec 8, 2016
  60. Junio C HamanoDec 9, 2016
  61. Stefan BellerDec 9, 2016
  62. Brandon WilliamsDec 10, 2016
  63. Junio C HamanoDec 10, 2016
  64. Stefan BellerDec 12, 2016
  65. Junio C HamanoDec 12, 2016
  66. 16/16 pathspec: rename prefix_pathspec to init_pathspec_itemBrandon Williams, Dec 8, 2016
  67. 13/16 pathspec: create parse_element_magic helperBrandon Williams, Dec 8, 2016
  68. 15/16 pathspec: small readability changesBrandon Williams, Dec 8, 2016
  69. 14/16 pathspec: create strip submodule slash helpersBrandon Williams, Dec 8, 2016
  70. Junio C HamanoDec 9, 2016
  71. Duy NguyenDec 9, 2016
  72. 14/16 pathspec: create strip submodule slash helpersBrandon Williams, Dec 9, 2016
  73. Stefan BellerDec 9, 2016
  74. Brandon WilliamsDec 9, 2016
  75. 08/16 pathspec: always show mnemonic and name in unsupported_magicBrandon Williams, Dec 8, 2016
  76. 04/16 ls-tree: convert show_recursive to use the pathspec struct interfaceBrandon Williams, Dec 8, 2016
  77. 05/16 pathspec: remove the deprecated get_pathspec functionBrandon Williams, Dec 8, 2016
  78. 07/16 pathspec: remove unused variable from unsupported_magicBrandon Williams, Dec 8, 2016
  79. Junio C HamanoDec 9, 2016
  80. Brandon WilliamsDec 9, 2016
  81. 00/16 pathspec cleanupBrandon Williams, Dec 13, 2016
  82. 02/16 dir: remove struct path_simplifyBrandon Williams, Dec 13, 2016
  83. Stefan BellerDec 19, 2016
  84. Duy NguyenJan 3, 2017
  85. 04/16 ls-tree: convert show_recursive to use the pathspec struct interfaceBrandon Williams, Dec 13, 2016
  86. 03/16 dir: convert fill_directory to use the pathspec struct interfaceBrandon Williams, Dec 13, 2016
  87. 07/16 pathspec: remove unused variable from unsupported_magicBrandon Williams, Dec 13, 2016
  88. 08/16 pathspec: always show mnemonic and name in unsupported_magicBrandon Williams, Dec 13, 2016
  89. Duy NguyenJan 3, 2017
  90. Brandon WilliamsJan 3, 2017
  91. 06/16 pathspec: copy and free owned memoryBrandon Williams, Dec 13, 2016
  92. Duy NguyenJan 3, 2017
  93. 01/16 mv: remove use of deprecated 'get_pathspec()'Brandon Williams, Dec 13, 2016
  94. 09/16 pathspec: simpler logic to prefix original pathspec elementsBrandon Williams, Dec 13, 2016
  95. 05/16 pathspec: remove the deprecated get_pathspec functionBrandon Williams, Dec 13, 2016
  96. 13/16 pathspec: create parse_element_magic helperBrandon Williams, Dec 13, 2016
  97. 15/16 pathspec: small readability changesBrandon Williams, Dec 13, 2016
  98. 14/16 pathspec: create strip submodule slash helpersBrandon Williams, Dec 13, 2016
  99. 12/16 pathspec: create parse_long_magic functionBrandon Williams, Dec 13, 2016
  100. 16/16 pathspec: rename prefix_pathspec to init_pathspec_itemBrandon Williams, Dec 13, 2016
  101. 11/16 pathspec: create parse_short_magic functionBrandon Williams, Dec 13, 2016
  102. 10/16 pathspec: factor global magic into its own functionBrandon Williams, Dec 13, 2016
  103. 00/16 pathspec cleanupBrandon Williams, Jan 3, 2017
  104. 03/16 dir: convert fill_directory to use the pathspec struct interfaceBrandon Williams, Jan 3, 2017
  105. 10/16 pathspec: factor global magic into its own functionBrandon Williams, Jan 3, 2017
  106. 04/16 ls-tree: convert show_recursive to use the pathspec struct interfaceBrandon Williams, Jan 3, 2017
  107. 01/16 mv: remove use of deprecated 'get_pathspec()'Brandon Williams, Jan 3, 2017
  108. 09/16 pathspec: simpler logic to prefix original pathspec elementsBrandon Williams, Jan 3, 2017
  109. 14/16 pathspec: create strip submodule slash helpersBrandon Williams, Jan 3, 2017
  110. 08/16 pathspec: always show mnemonic and name in unsupported_magicBrandon Williams, Jan 3, 2017
  111. 07/16 pathspec: remove unused variable from unsupported_magicBrandon Williams, Jan 3, 2017
  112. 05/16 pathspec: remove the deprecated get_pathspec functionBrandon Williams, Jan 3, 2017
  113. 13/16 pathspec: create parse_element_magic helperBrandon Williams, Jan 3, 2017
  114. 11/16 pathspec: create parse_short_magic functionBrandon Williams, Jan 3, 2017
  115. 06/16 pathspec: copy and free owned memoryBrandon Williams, Jan 3, 2017
  116. 15/16 pathspec: small readability changesBrandon Williams, Jan 3, 2017
  117. 02/16 dir: remove struct path_simplifyBrandon Williams, Jan 3, 2017
  118. 12/16 pathspec: create parse_long_magic functionBrandon Williams, Jan 3, 2017
  119. 16/16 pathspec: rename prefix_pathspec to init_pathspec_itemBrandon Williams, Jan 3, 2017
  120. Duy NguyenJan 4, 2017
  121. Brandon WilliamsJan 4, 2017
  122. Brandon WilliamsJan 4, 2017
  123. 00/16 pathspec cleanupBrandon Williams, Jan 4, 2017
  124. 15/16 pathspec: small readability changesBrandon Williams, Jan 4, 2017
  125. 13/16 pathspec: create parse_element_magic helperBrandon Williams, Jan 4, 2017
  126. 12/16 pathspec: create parse_long_magic functionBrandon Williams, Jan 4, 2017
  127. 10/16 pathspec: factor global magic into its own functionBrandon Williams, Jan 4, 2017
  128. 08/16 pathspec: always show mnemonic and name in unsupported_magicBrandon Williams, Jan 4, 2017
  129. 09/16 pathspec: simpler logic to prefix original pathspec elementsBrandon Williams, Jan 4, 2017
  130. 16/16 pathspec: rename prefix_pathspec to init_pathspec_itemBrandon Williams, Jan 4, 2017
  131. 14/16 pathspec: create strip submodule slash helpersBrandon Williams, Jan 4, 2017
  132. 07/16 pathspec: remove unused variable from unsupported_magicBrandon Williams, Jan 4, 2017
  133. 11/16 pathspec: create parse_short_magic functionBrandon Williams, Jan 4, 2017
  134. 04/16 ls-tree: convert show_recursive to use the pathspec struct interfaceBrandon Williams, Jan 4, 2017
  135. 02/16 dir: remove struct path_simplifyBrandon Williams, Jan 4, 2017
  136. 03/16 dir: convert fill_directory to use the pathspec struct interfaceBrandon Williams, Jan 4, 2017
  137. 01/16 mv: remove use of deprecated 'get_pathspec()'Brandon Williams, Jan 4, 2017
  138. 05/16 pathspec: remove the deprecated get_pathspec functionBrandon Williams, Jan 4, 2017
  139. 06/16 pathspec: copy and free owned memoryBrandon Williams, Jan 4, 2017
  140. Duy NguyenJan 7, 2017
  141. Junio C HamanoJan 9, 2017
  142. Brandon WilliamsJan 9, 2017

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.