Eric Sunshine <sunshine@xxxxxxxxxxxxxx> writes: > Thanks for working on this.... <aol>metoo</aol> > Stepping back a bit, is a for-each-foo()-style interface desirable? > This sort of interface imposes a good deal of complexity on callers, > demanding a callback function and callback data (cb_data), and is > generally (at least in C) more difficult to reason about than other > simpler interfaces. Is such complexity warranted? > > An alternate, much simpler interface would be to have a function, say > get_worktrees(), return an array of 'worktree' structures to the > caller, which the caller would iterate over (which is a common > operation in C, thus easily reasoned about). Nice. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html