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

Re: [PATCH v2 12/13] dir_iterator: new API for iterating over a directory tree

From
Michael Haggerty <mhagger@alum.mit.edu>
Date
Jun 9, 2016, 12:35 UTC
Message-ID
<5759628A.4020704@alum.mit.edu>
In-Reply-To
<575956FB.9010207@alum.mit.edu>
On 06/09/2016 01:46 PM, Michael Haggerty wrote:
> On 06/07/2016 07:13 AM, Eric Sunshine wrote:
>> [...]
> Thanks for all your great comments!
Junio,

Given that ref-iterators is in next but also that you will soon be rewinding next, would you like these tweaks as a re-roll of the branch, as fixup patches to squash on top, or as a new patch series to be administered separately? I don't think any of these changes are serious enough to warrant holding up ref-iterators, so it's mostly a question of what would be most convenient for you.

For the case that you prefer a re-roll, I have pushed it to my fork on GitHub [1] as branch ref-iterators. This branch squashes in Ramsay's patch [2], addresses Eric's comments from this thread, and incorporates the whitespace fix that you made when incorporating v2.

List of changes relative to v2:
* In "refs: introduce an iterator interface":
  * Make two vtables private.
  * Add a whitespace fix from Junio's mh/ref-iterators.
* In "dir_iterator: new API for iterating over a directory tree":
  * Add and improve some comments and docstrings.
  * Fix some formatting problems.
  * Use a for rather than a while loop in `dir_iterator_abort()` to
    improve the clarity.
  * Warn on failures of `opendir()`, `readdir()`, and `closedir()`
    that can't be explained as a simple race.
* In "for_each_reflog(): reimplement using iterators", make the vtable
  private.
If you'd prefer a separate series, let me know and I'll prepare that.
Michael

[1] https://github.com/mhagger/git [2] http://thread.gmane.org/gmane.comp.version-control.git/296801

Previous: Michael HaggertyNext: Junio C Hamano
Message 16 of 23 in “Reference iterators”
  1. 00/13 Reference iteratorsMichael Haggerty, Jun 3, 2016
  2. 01/13 refs: remove unnecessary "extern" keywordsMichael Haggerty, Jun 3, 2016
  3. 02/13 do_for_each_ref(): move docstring to the header fileMichael Haggerty, Jun 3, 2016
  4. 03/13 refs: use name "prefix" consistentlyMichael Haggerty, Jun 3, 2016
  5. 04/13 delete_refs(): add a flags argumentMichael Haggerty, Jun 3, 2016
  6. 05/13 remote rm: handle symbolic refs correctlyMichael Haggerty, Jun 3, 2016
  7. 06/13 get_ref_cache(): only create an instance if there is a submoduleMichael Haggerty, Jun 3, 2016
  8. 07/13 entry_resolves_to_object(): rename function from ref_resolves_to_object()Michael Haggerty, Jun 3, 2016
  9. 08/13 ref_resolves_to_object(): new functionMichael Haggerty, Jun 3, 2016
  10. 09/13 refs: introduce an iterator interfaceMichael Haggerty, Jun 3, 2016
  11. 10/13 do_for_each_ref(): reimplement using reference iterationMichael Haggerty, Jun 3, 2016
  12. 11/13 for_each_reflog(): don't abort for bad referencesMichael Haggerty, Jun 3, 2016
  13. 12/13 dir_iterator: new API for iterating over a directory treeMichael Haggerty, Jun 3, 2016
  14. Eric SunshineJun 7, 2016
  15. Michael HaggertyJun 9, 2016
  16. Michael HaggertyJun 9, 2016
  17. Junio C HamanoJun 9, 2016
  18. 13/13 for_each_reflog(): reimplement using iteratorsMichael Haggerty, Jun 3, 2016
  19. David TurnerJun 3, 2016
  20. Junio C HamanoJun 3, 2016
  21. Michael HaggertyJun 3, 2016
  22. Junio C HamanoJun 3, 2016
  23. Michael HaggertyJun 7, 2016

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.