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

Re: [PATCH v2 0/7] Provide API to invalidate refs cache

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 11, 2011, 17:26 UTC
Message-ID
<7v4nzfh21o.fsf@alter.siamese.dyndns.org>
In-Reply-To
<4E93D932.6020001@alum.mit.edu>
Michael Haggerty <mhagger@alum.mit.edu> writes:
Show 9 quoted lines
> On 10/11/2011 02:02 AM, Junio C Hamano wrote:
> ...
>> I could rebase your series, but it always is more error prone to have
>> somebody who is not the original author rebase a series than the original
>> author build for the intended base tree from the beginning.
>
> I don't mind rebasing this little series on jp/get-ref-dir-unsorted.
> ...
> Rebasing 78 patches is going to be a morass of clerical work.
I do not think it is "clerical" in the first place.

Realistically, I expect that a 50+ patch series that touch fairly an important part of the system to take 2 cycles and a half before it hits a released version, judging from our recent experience with the recursive merge fix-up series.

When we already have a patch that has been discussed well enough on the list to fix somebody's real world problem, can we afford to block it and give an exclusive write lock to part of the codebase for 2 cycles to your series, or anybody's for that matter?

> Is there any alternative?

I think an alternative is not to hold on to a series before it gets so large to make you feel adjusting to the needs to other changes in the codebase is "clerical". Commit often and early while developing the initial pass, re-read often and throughout the whole process looking for things you regret you would have done in early in the series that you didn't (aka "oops, here is a fixup for the thinko in the early patch in the series), and clean-up early while preparing to publish. Reorder the parts that you are more confident that they do not need to change to come early in the series, and unleash these early parts when you reach certain confidence level.

I think your iterate-refs series was an example of good execution. It made the codeflow a lot clearer by reducing the special casing of the submodule parameter. In your grand scheme of things (e.g. read only parts of the ref namespace as needed) you might consider it a mere side effect, but the series by itself was a good thing to have.

Sometimes you may feel that a part of your series when taken out of context would not justify itself like the iterate-refs series did, until later parts of the series start taking advantage of the change. But that is what commit log messages are for: e.g. "this change to encapsulate these global variables into a single structure does not make a difference in the current codebase, but in a later patch this and that callers will need additional pieces of information passed aruond in the callchain, and will add new members to the structure".

> ...  So maybe
> I brought this whole mess down on my own head :-(
No, it is not anybody's fault in particular. That's life and open source.
Previous: Julian PhillipsNext: Michael Haggerty
Message 34 of 54 in “Retain caches of submodule refs”
  1. 0/6 Retain caches of submodule refsMichael Haggerty, Aug 12, 2011
  2. 1/6 Extract a function clear_cached_refs()Michael Haggerty, Aug 12, 2011
  3. 2/6 Access reference caches only through new function get_cached_refs().Michael Haggerty, Aug 12, 2011
  4. Junio C HamanoAug 14, 2011
  5. Michael HaggertyAug 23, 2011
  6. 3/6 Change the signature of read_packed_refs()Michael Haggerty, Aug 12, 2011
  7. 4/6 Allocate cached_refs objects dynamicallyMichael Haggerty, Aug 12, 2011
  8. Junio C HamanoAug 14, 2011
  9. 5/6 Store the submodule name in struct cached_refs.Michael Haggerty, Aug 12, 2011
  10. 6/6 Retain caches of submodule refsMichael Haggerty, Aug 12, 2011
  11. Heiko VoigtAug 13, 2011
  12. Michael HaggertyAug 24, 2011
  13. Heiko VoigtAug 24, 2011
  14. Junio C HamanoAug 16, 2011
  15. Michael HaggertyAug 24, 2011
  16. Michael HaggertyOct 9, 2011
  17. Junio C HamanoOct 9, 2011
  18. 0/2 Provide API to invalidate refs cacheMichael Haggerty, Oct 10, 2011
  19. 1/2 invalidate_cached_refs(): take the submodule as parameterMichael Haggerty, Oct 10, 2011
  20. 2/2 invalidate_cached_refs(): expose this function in refs APIMichael Haggerty, Oct 10, 2011
  21. 0/7 Provide API to invalidate refs cacheMichael Haggerty, Oct 10, 2011
  22. 1/7 invalidate_ref_cache(): rename function from invalidate_cached_refs()Michael Haggerty, Oct 10, 2011
  23. Junio C HamanoOct 11, 2011
  24. Michael HaggertyOct 11, 2011
  25. 2/7 invalidate_ref_cache(): take the submodule as parameterMichael Haggerty, Oct 10, 2011
  26. 3/7 invalidate_ref_cache(): expose this function in refs APIMichael Haggerty, Oct 10, 2011
  27. 4/7 clear_cached_refs(): rename parameterMichael Haggerty, Oct 10, 2011
  28. 5/7 clear_cached_refs(): extract two new functionsMichael Haggerty, Oct 10, 2011
  29. 6/7 write_ref_sha1(): only invalidate the loose ref cacheMichael Haggerty, Oct 10, 2011
  30. 7/7 clear_cached_refs(): inline functionMichael Haggerty, Oct 10, 2011
  31. Junio C HamanoOct 11, 2011
  32. Michael HaggertyOct 11, 2011
  33. Julian PhillipsOct 11, 2011
  34. Junio C HamanoOct 11, 2011
  35. 0/7 Provide API to invalidate refs cacheMichael Haggerty, Oct 12, 2011
  36. 1/7 invalidate_ref_cache(): rename function from invalidate_cached_refs()Michael Haggerty, Oct 12, 2011
  37. Junio C HamanoOct 12, 2011
  38. Michael HaggertyOct 12, 2011
  39. 2/7 invalidate_ref_cache(): take the submodule as parameterMichael Haggerty, Oct 12, 2011
  40. Junio C HamanoOct 12, 2011
  41. Michael HaggertyOct 12, 2011
  42. Junio C HamanoOct 17, 2011
  43. Michael HaggertyNov 3, 2011
  44. Junio C HamanoNov 3, 2011
  45. 3/7 invalidate_ref_cache(): expose this function in refs APIMichael Haggerty, Oct 12, 2011
  46. 4/7 clear_cached_refs(): rename parameterMichael Haggerty, Oct 12, 2011
  47. 5/7 clear_cached_refs(): extract two new functionsMichael Haggerty, Oct 12, 2011
  48. 6/7 write_ref_sha1(): only invalidate the loose ref cacheMichael Haggerty, Oct 12, 2011
  49. 7/7 clear_cached_refs(): inline functionMichael Haggerty, Oct 12, 2011
  50. Junio C HamanoOct 12, 2011
  51. Heiko VoigtOct 10, 2011
  52. Michael HaggertyOct 11, 2011
  53. Heiko VoigtOct 11, 2011
  54. Heiko VoigtAug 13, 2011

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.