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

Re: [RFC PATCH 0/5] Introduce -t, --table for status/add commands

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 24, 2023, 02:03 UTC
Message-ID
<xmqqil6w6al3.fsf@gitster.g>
In-Reply-To
<62164acf4a787042dbb6e5abe212559b@manjaro.org>
Dragan Simic <dsimic@manjaro.org> writes:
Show 5 quoted lines
> IMHO, it would be the best to simply implement support for
> "<command>.verbose = table" in the git configuration, similarly to how
> we already have "commit.verbose = true".  That way tables could be
> enabled per command, according to the user's preferences, regardless
> of performing dry runs or not.

I think the "use more verbose report format to help relatively inexperienced folks, in exchange for spending more screen real estate" is a good direction to think about this thing.

I am not personally interested in adding such support all that much myself, but one piece of advice I can offer those who are interested is not to be too deeply attached to the word "table".

It may be that "git status" (not "status -s" [*] but the current version for human consumption) shows "paths with changes to be committed (i.e. changes added to the index exist)" and "paths with changes you could add to the index (i.e. changes yet to be added to the index exist)" in a separate list, and Jacob may have found that it gives a more understandable view into the states of each path if the output is turned 90-degrees and the changes are shown in a tabular form. But "table" in this example is merely an implementation detail of one presentation that is easier to understand for "git status", and calling it "table" and making it a word in the vocabulary of <command>.verbose is like a tail wagging the dog. We want to convey to the users that the option is about "with extra verbosity, the user is buying a bit more clarity", not necessarily "use tabular form no matter what".

For some of the commands, tabular presentation might not even be the presentation form that is the easiest to understand to novices. For example, I just pushed out today's integration result to some of my repositories, and "git push" output looks like so:

To github.com:gitster/git.git
 + 5cb4030332...7dc6f5ada8 ak/color-decorate-symbols -> ak/colo...
 + a71066b71b...c80a646458 jch -> jch (forced update)
 + 89a1ffc6a4...416cdf7260 seen -> seen (forced update)
 + 7ff160463b...2c610ca9ff tb/merge-tree-write-pack -> tb/merge...
   2e3b7b2460..57243409ad  refs/notes/amlog -> refs/notes/amlog

This is already "tabular" and gives enough information to tell me which ones did not get updated (e.g., I do not see 'next' there) and which ones are forced ('jch' and 'seen' are usually forced and I'll notice that I may have made mistakes if they are not). But a hypothetical presentation that is easier for novices to read may show "git log --oneline --graph old...new" (or some abbreviated form of it) between the old and new tips of the affected branches. At that point, calling the improved output as "table" would make little sense.

For commands that Jacob found it easier to explain in tabular form, like "git add", it is very possible that two years down the road, another Jacob comes around and proposes a different presentation that is even easier for novices to understand, and it may not be a tabular form.

So be very careful when choosing what to call this new thing, and avoid naming it after the implementation details (e.g., in what particular shape the data gets presented) that may turn out not to be the most important part of the concept.

[Footnote]
 * FWIW, "git status -s" is a tabular presentation.  Maybe we can
   add a more verbose form of "-s" and be done with it for the
   command?
Previous: Dragan SimicNext: Dragan Simic
Message 29 of 62 in “Introduce -t, --table for status/add commands”
  1. 0/5 Introduce -t, --table for status/add commandsJacob Stopak, Oct 20, 2023
  2. 1/5 status: introduce -t, --table flagJacob Stopak, Oct 20, 2023
  3. 2/5 status: handle long paths with -t, --table flagJacob Stopak, Oct 20, 2023
  4. 3/5 status: add advice arg for -t, --table flagJacob Stopak, Oct 20, 2023
  5. 5/5 add: set unique color for -t, --table arrowsJacob Stopak, Oct 20, 2023
  6. 4/5 add: add -t, --table flag for visual dry runsJacob Stopak, Oct 20, 2023
  7. Dragan SimicOct 20, 2023
  8. Jacob StopakOct 20, 2023
  9. Dragan SimicOct 20, 2023
  10. Junio C HamanoOct 20, 2023
  11. Jacob StopakOct 22, 2023
  12. Dragan SimicOct 22, 2023
  13. Jacob StopakOct 22, 2023
  14. Dragan SimicOct 22, 2023
  15. Oswald BuddenhagenOct 22, 2023
  16. Dragan SimicOct 22, 2023
  17. Oswald BuddenhagenOct 23, 2023
  18. Dragan SimicOct 23, 2023
  19. Jacob StopakOct 23, 2023
  20. Dragan SimicOct 23, 2023
  21. Oswald BuddenhagenOct 23, 2023
  22. Jacob StopakOct 23, 2023
  23. Oswald BuddenhagenOct 23, 2023
  24. Dragan SimicOct 23, 2023
  25. Oswald BuddenhagenOct 23, 2023
  26. Dragan SimicOct 23, 2023
  27. Jacob StopakOct 23, 2023
  28. Dragan SimicOct 24, 2023
  29. Junio C HamanoOct 24, 2023
  30. Dragan SimicOct 24, 2023
  31. Dragan SimicJan 5, 2024
  32. Jacob StopakJan 6, 2024
  33. Dragan SimicJan 6, 2024
  34. Dragan SimicOct 23, 2023
  35. Junio C HamanoOct 23, 2023
  36. Dragan SimicOct 23, 2023
  37. Oswald BuddenhagenOct 23, 2023
  38. Dragan SimicOct 23, 2023
  39. Jacob StopakOct 23, 2023
  40. Dragan SimicOct 23, 2023
  41. Jacob StopakOct 23, 2023
  42. Jacob StopakOct 22, 2023
  43. 0/6 Noobify format for status, add, restoreJacob Stopak, Oct 26, 2023
  44. 1/6 status: add noob format from status.noob configJacob Stopak, Oct 26, 2023
  45. Junio C HamanoOct 30, 2023
  46. Dragan SimicOct 30, 2023
  47. Jacob StopakOct 30, 2023
  48. 2/6 status: handle long paths in noob formatJacob Stopak, Oct 26, 2023
  49. 4/6 add: set unique color for noob mode arrowsJacob Stopak, Oct 26, 2023
  50. 3/6 add: implement noob modeJacob Stopak, Oct 26, 2023
  51. 5/6 restore: implement noob modeJacob Stopak, Oct 26, 2023
  52. 6/6 status: add advice status hints as table footerJacob Stopak, Oct 26, 2023
  53. Dragan SimicOct 27, 2023
  54. Jacob StopakOct 27, 2023
  55. Dragan SimicOct 28, 2023
  56. Jacob StopakOct 28, 2023
  57. Dragan SimicOct 28, 2023
  58. Jacob StopakOct 28, 2023
  59. Dragan SimicOct 28, 2023
  60. Jacob StopakOct 28, 2023
  61. Dragan SimicOct 28, 2023
  62. Jacob StopakOct 28, 2023

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.