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

Re: [PATCH v2 2/2] whatchanged: require --i-still-use-this

From
Patrick Steinhardt <ps@pks.im>
Date
May 2, 2025, 09:08 UTC
Message-ID
<aBSLgTlfwSc1u_bH@pks.im>
In-Reply-To
<20250501225958.2947677-3-gitster@pobox.com>
On Thu, May 01, 2025 at 03:59:58PM -0700, Junio C Hamano wrote:
Show 18 quoted lines
> diff --git a/builtin/log.c b/builtin/log.c
> index 04a6ef97bc..0f98ac8a34 100644
> --- a/builtin/log.c
> +++ b/builtin/log.c
> @@ -113,6 +113,13 @@ struct log_config {
>  	int fmt_patch_name_max;
>  	char *fmt_pretty;
>  	char *default_date_mode;
> +
> +	/*
> +	 * Note: git_log_config() does not touch this member and that
> +	 * is very deliberate.  This member is only to be used to
> +	 * resurrect whatchanged that is deprecated.
> +	 */
> +	int i_still_use_this;
>  };
>  
>  static void log_config_init(struct log_config *cfg)

I was briefly wondering why this variable wasn't just declared in `cmd_whatchanged()`, but that's because parsing is of course done by `cmd_log_init_finish()`. Nothing worth thinking about too much.

Show 11 quoted lines
> @@ -656,6 +665,10 @@ int cmd_whatchanged(int argc,
>  	opt.def = "HEAD";
>  	opt.revarg_opt = REVARG_COMMITTISH;
>  	cmd_log_init(argc, argv, prefix, &rev, &opt, &cfg);
> +
> +	if (!cfg.i_still_use_this)
> +		you_still_use_that("git whatchanged");
> +
>  	if (!rev.diffopt.output_format)
>  		rev.diffopt.output_format = DIFF_FORMAT_RAW;
>  

I think it would help potential users of this command quite a bit if we explicitly told them what the replacement is. So maybe we can extend `you_still_use_that()` to accept an explanation?

Patrick
Previous: Junio C HamanoNext: Junio C Hamano
Message 8 of 39 in “Nominating "whatchanged" for removal”
  1. 0/2 Nominating "whatchanged" for removalJunio C Hamano, May 1, 2025
  2. 1/2 you-still-use-that??: help deprecating commands for removalJunio C Hamano, May 1, 2025
  3. 2/2 whatchanged: require --i-still-use-thisJunio C Hamano, May 1, 2025
  4. Junio C HamanoMay 1, 2025
  5. 0/2 Nominating "whatchanged" for removalJunio C Hamano, May 1, 2025
  6. 1/2 you-still-use-that??: help deprecating commands for removalJunio C Hamano, May 1, 2025
  7. 2/2 whatchanged: require --i-still-use-thisJunio C Hamano, May 1, 2025
  8. Patrick SteinhardtMay 2, 2025
  9. Junio C HamanoMay 2, 2025
  10. Patrick SteinhardtMay 5, 2025
  11. Patrick SteinhardtMay 2, 2025
  12. Junio C HamanoMay 2, 2025
  13. 0/6 Nominating "whatchanged" for removalJunio C Hamano, May 3, 2025
  14. 1/6 you-still-use-that??: help deprecating commands for removalJunio C Hamano, May 3, 2025
  15. Elijah NewrenMay 12, 2025
  16. 2/6 doc: prepare for a world without whatchangedJunio C Hamano, May 3, 2025
  17. Elijah NewrenMay 12, 2025
  18. 3/6 tests: prepare for a world without whatchangedJunio C Hamano, May 3, 2025
  19. Patrick SteinhardtMay 5, 2025
  20. Elijah NewrenMay 12, 2025
  21. 4/6 whatchanged: require --i-still-use-thisJunio C Hamano, May 3, 2025
  22. Patrick SteinhardtMay 5, 2025
  23. Junio C HamanoMay 5, 2025
  24. 5/6 whatchanged: remove when built with WITH_BREAKING_CHANGESJunio C Hamano, May 3, 2025
  25. Patrick SteinhardtMay 5, 2025
  26. Junio C HamanoMay 5, 2025
  27. 6/6 whatschanged: list it in BreakingChanges documentJunio C Hamano, May 3, 2025
  28. Elijah NewrenMay 12, 2025
  29. Junio C HamanoMay 12, 2025
  30. 0/6 Nominating "whatchanged" for removalJunio C Hamano, May 12, 2025
  31. 1/6 you-still-use-that??: help deprecating commands for removalJunio C Hamano, May 12, 2025
  32. 2/6 doc: prepare for a world without whatchangedJunio C Hamano, May 12, 2025
  33. 3/6 tests: prepare for a world without whatchangedJunio C Hamano, May 12, 2025
  34. 4/6 whatchanged: require --i-still-use-thisJunio C Hamano, May 12, 2025
  35. Junio C HamanoMay 14, 2025
  36. 5/6 whatchanged: remove when built with WITH_BREAKING_CHANGESJunio C Hamano, May 12, 2025
  37. 6/6 whatschanged: list it in BreakingChanges documentJunio C Hamano, May 12, 2025
  38. Elijah NewrenMay 12, 2025
  39. Junio C HamanoMay 12, 2025

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.