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

Re: [GSoC][PATCH 1/6 v2] submodule--helper: introduce for_each_submodule_list

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 28, 2017, 19:53 UTC
Message-ID
<xmqq60ffx51d.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20170626231108.23640-1-pc44800@gmail.com>
Prathamesh Chavan <pc44800@gmail.com> writes:
Show 5 quoted lines
> Introduce function for_each_submodule_list for using it
> in the later patches, related to porting submodule
> subcommands from shell to C.
> This new function is also used in ported submodule subcommand
> init.

The patch text looks sensible. It would be easier for "git log" readers to understand, if the change is explained like so:

	Introduce function for_each_submodule_list() and
	replace a loop in module_init() with a call to it.
	The new function will also be used in other parts of the
	system in later patches.

That way, readers do not have to judge the merit of this change based on a vague promise "it will help world better with future patches", but can instead judge on its immediate benefit that it refactors a useful bit out of an existing code.

Show 5 quoted lines
> Mentored-by: Christian Couder <christian.couder@gmail.com>
> Mentored-by: Stefan Beller <sbeller@google.com>
> Signed-off-by: Prathamesh Chavan <pc44800@gmail.com>
> ---
> This series of patches is based on the 'next' branch. 
The reason not to base on 'master' is...?

The thing is that a topic built on 'next' cannot be merged down to 'master' until _all_ other topics in 'next' graduate to 'master', which may never happen. If you are depending on one or more topics, please make sure to name them. Then we can

 (1) create a branch from the tip of 'master';
 (2) merge these topics you depend on into that branch; and then
 (3) apply these patches.

The topic still needs to wait until these other topis graduate, but at least you would not be blocked by unrelated topics that way.

You _might_ be building on 'next' because you want to make sure that your topic works not just with master but also want to make sure that there won't be any unexpected breakage when used with topics in 'next', even though your topic does not depend on anything in 'next' in particular. It is a good development discipline to pay attention to other topics in flight and I applaud you for it if that is why you based it on 'next'. But the right way to do it would be to build your topic on 'master', and then in addition to testing the topic by itself, also make a trial merge of your topic into 'next' and test the result as well.

Thanks.
Previous: Christian CouderNext: Prathamesh Chavan
Message 11 of 28 in “[GSoC] Update: Week 6”
  1. Prathamesh ChavanJun 26, 2017
  2. [GSoC][PATCH 1/6 v2] submodule--helper: introduce for_each_submodule_listPrathamesh Chavan, Jun 26, 2017
  3. [GSoC][PATCH 2/6 v2] submodule: port subcommand foreach from shell to CPrathamesh Chavan, Jun 26, 2017
  4. Christian CouderJun 27, 2017
  5. [GSoC][PATCH 3/6 v2] submodule: port set_name_rev from shell to CPrathamesh Chavan, Jun 26, 2017
  6. [GSoC][PATCH 6/6 v2] submodule: port submodule subcommand 'deinit' from shell to CPrathamesh Chavan, Jun 26, 2017
  7. Christian CouderJun 27, 2017
  8. [GSoC][PATCH 4/6 v2] submodule: port submodule subcommand statusPrathamesh Chavan, Jun 26, 2017
  9. [GSoC][PATCH 5/6 v2] submodule: port submodule subcommand sync from shell to CPrathamesh Chavan, Jun 26, 2017
  10. Christian CouderJun 27, 2017
  11. Junio C HamanoJun 28, 2017
  12. Prathamesh ChavanJun 29, 2017
  13. [GSoC][PATCH 1/5 v3] submodule--helper: introduce get_submodule_displaypath()Prathamesh Chavan, Jun 30, 2017
  14. [GSoC][PATCH 5/5 v3] submodule: port submodule subcommand 'sync' from shell to CPrathamesh Chavan, Jun 30, 2017
  15. Stefan BellerJun 30, 2017
  16. Junio C HamanoJun 30, 2017
  17. [GSoC][PATCH 2/5 v3] submodule--helper: introduce for_each_submodule_list()Prathamesh Chavan, Jun 30, 2017
  18. [GSoC][PATCH 4/5 v3] submodule: port submodule subcommand 'status' from shell to CPrathamesh Chavan, Jun 30, 2017
  19. Junio C HamanoJun 30, 2017
  20. [GSoC][PATCH 3/5 v3] submodule: port set_name_rev() from shell to CPrathamesh Chavan, Jun 30, 2017
  21. Junio C HamanoJun 30, 2017
  22. Junio C HamanoJun 30, 2017
  23. [GSoC][PATCH 1/5 v4] submodule--helper: introduce get_submodule_displaypath()Prathamesh Chavan, Jul 13, 2017
  24. [GSoC][PATCH 2/5 v4] submodule--helper: introduce for_each_submodule_list()Prathamesh Chavan, Jul 13, 2017
  25. [GSoC][PATCH 3/5 v4] submodule: port set_name_rev() from shell to CPrathamesh Chavan, Jul 13, 2017
  26. [GSoC][PATCH 4/5 v4] submodule: port submodule subcommand 'status' from shell to CPrathamesh Chavan, Jul 13, 2017
  27. Stefan BellerJul 13, 2017
  28. [GSoC][PATCH 5/5 v4] submodule: port submodule subcommand 'sync' from shell to CPrathamesh Chavan, Jul 13, 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.