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
Jacob Stopak <jacob@initialcommit.io>
Date
Oct 23, 2023, 23:17 UTC
Message-ID
<ZTb/HeILRHnZjaz6.jacob@initialcommit.io>
In-Reply-To
<ZTbVY7Nf+DTYqHky@ugly>
On Mon, Oct 23, 2023 at 10:19:47PM +0200, Oswald Buddenhagen wrote:
Show 7 quoted lines
> On Mon, Oct 23, 2023 at 12:29:12PM -0700, Jacob Stopak wrote:
> > Those arrows showing how things move only really apply to "simulating"
> > (dry runs) for specific commands like add, restore, rm, commit, stash,
> > etc, so making the --table proposal a default status output would still
> > miss those scenarios.
> > 
> you're too focused on the status quo of your own tool. :-)

Ha it's possible. I created git-sim with a very specific use case in mind so you're right it's probably worth rethinking that while taking into account Git's other functionality that wasn't in the picture with an external tool.

> there is really nothing that would speak against the real commands reporting
> what they just *actually did*. this would seem rather helpful for noobs and
> other insecure users.

That's true, it would be just as easy to report the results of a command (and even easier in some cases) than forecasting the result in a dry-run. The question is how to decide which one? Do you report the results of certain commands by default while hints are enabled? And only as a dry run when the --dry-run / -n flag is added? That actually would make sense as it wouldn't add "special" behavior to the dry run. The dry run would just report the exact same default output as the normal command, but omit the action.

> if one really wanted, "you can also use this with --dry-run" could be part
> of the hint that would say how to turn off the extra verbosity (or just the
> hint itself, if one likes the verbosity).

Interesting. So many ways to think about how to optimize the user interaction...

> one could even go one step further and put at least the destructive commands
> into interactive/confirmation mode by default. but that's probably a bridge
> too far, as it would be potentially habit-forming in a bad way.

That would be an interesting add on to our discussion above. So as a thought experiment, let's pretend there are no restrictions from traditional users, we could:

  1) Enable verbose results output by default to certain commands, which
     could include a visual table-based output where applicable, and a
     hint to disable it. (Are hints currently command-specific? Or even
     scenario-specific within a command? Or is it all or nothing?)
  2) Include verbose/table results on dry runs, and add dry run flags onto
     commands that should seem to have it for consistency. For example
     "git add" has a dry run flag but "git restore" (the hinted inverse
     operation) does not. I assume on dry runs hints wouldn't be used to
     communicate anything.
  3) Well, I'll admit about once every 3 months I run "git stash --all"
     when I really meant "git stash --include-untracked" and proceed to
     lose a small part of my soul. This would be saved by a simple
     confirmation. I find that the stuff like "git reset --hard" doesn't
     bother me anymore since I know when to be careful with it and what
     things I can get back and how to do it. But I find the nasty ones
     are the things that sound like what you want but end up doing
     something bad. Not sure there is a way to isolate those though...
     I'm rambling now. But maybe for interactivity, at the very least it
     could be added to dry runs, like a "Here's what would happen, want
     to run it now?" I got this feedback a few times for git-sim as well.
Previous: Dragan SimicNext: Dragan Simic
Message 27 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.