From: Jacob Stopak <jacob@initialcommit.io>
To: git@vger.kernel.org
Cc: Jacob Stopak <jacob@initialcommit.io>,
Junio C Hamano <gitster@pobox.com>,
Dragan Simic <dsimic@manjaro.org>,
Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Subject: [RFC PATCH v2 0/6] Noobify format for status, add, restore
Date: Thu, 26 Oct 2023 15:46:09 -0700 [thread overview]
Message-ID: <20231026224615.675172-1-jacob@initialcommit.io> (raw)
In-Reply-To: <20231020183947.463882-1-jacob@initialcommit.io>
Take into account reviewer feedback by doing several things differently:
* Rename this feature (for now) as "noob format mode" (or just "noob
mode") instead of the original "--table" verbiage. As pointed out,
this no longer ties the name of the setting to it's proposed
implementation detail as a table. Noob mode is not necessarily the
right name, just a placeholder for now. Unless people like it :D
* Instead of manually having to invoke the -t, --table every time this
format is to be used, set the config option "status.noob" to true.
Although this is logically tied to the status command, there are many
commands that produce status output, (and this series adds more), so
assume that if the user wants to see the status this way, that it
should be enabled whenever the status info is displayed.
* When running "git add" and "git restore" while noob mode is enabled,
perform the add/restore function as usual, but display the table
formatted output with arrows showing how file changes moved around.
Displaying the output in this understandable format after each
command execution allows the noob to immediately see what they did.
Although this series only implements for status, add, and restore,
this output format would make sense in other commands like rm, mv,
commit, clean, and stash.
* Works consistently with commands that already have a --dry-run
(-n) option. The dry run shows the exact same output, but
doesn't actually do the thing.
* If `advice.statusHints` is true, add a table footer with status hints.
Shorten these hints so that they are still clear but better fit into a
table. Make the hint text yellow to distinguish them. The hints only
appear when explicitly running "git status", which helps the user
answer the question "what can I do next?". Hints are omitted in
"impact" commands like add and restore. Having hints here distracts
from the file change moves being showed in the table by arrows.
TODO:
* "git status" outputs myriad other information depending on the state
of the repo, like branch info, merge conflicts, rebase info, bisect,
etc. Need to think about how to convey that info with the new setting.
* Some commands (like stash) might need more than 3 table columns to
display everything clearly.
* For destructive commands, think about adding a prompt describing the
effect, so the user can confirm before the action is taken.
* Fix horrible things in the patch series code.
* Probably other things.
Play around with it! It's fun!
Jacob Stopak (6):
status: add noob format from status.noob config
status: handle long paths in noob format
add: implement noob mode
add: set unique color for noob mode arrows
restore: implement noob mode
status: add advice status hints as table footer
Makefile | 2 +
builtin/add.c | 47 +++++--
builtin/checkout.c | 46 +++++--
builtin/commit.c | 157 +----------------------
commit.c | 2 +
noob.c | 198 +++++++++++++++++++++++++++++
noob.h | 21 ++++
read-cache-ll.h | 10 +-
read-cache.c | 41 +++++-
table.c | 301 +++++++++++++++++++++++++++++++++++++++++++++
table.h | 6 +
wt-status.c | 75 +++++++----
wt-status.h | 6 +
13 files changed, 708 insertions(+), 204 deletions(-)
create mode 100644 noob.c
create mode 100644 noob.h
create mode 100644 table.c
create mode 100644 table.h
--
2.42.0.404.g2bcc23f3db
next prev parent reply other threads:[~2023-10-26 22:46 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-20 18:39 [RFC PATCH 0/5] Introduce -t, --table for status/add commands Jacob Stopak
2023-10-20 18:39 ` [RFC PATCH 1/5] status: introduce -t, --table flag Jacob Stopak
2023-10-20 18:39 ` [RFC PATCH 2/5] status: handle long paths with " Jacob Stopak
2023-10-20 18:39 ` [RFC PATCH 3/5] status: add advice arg for " Jacob Stopak
2023-10-20 18:39 ` [RFC PATCH 4/5] add: add -t, --table flag for visual dry runs Jacob Stopak
2023-10-20 18:39 ` [RFC PATCH 5/5] add: set unique color for -t, --table arrows Jacob Stopak
2023-10-20 18:48 ` [RFC PATCH 0/5] Introduce -t, --table for status/add commands Dragan Simic
2023-10-20 21:48 ` Jacob Stopak
2023-10-20 23:02 ` Dragan Simic
2023-10-20 23:28 ` Junio C Hamano
2023-10-22 6:04 ` Jacob Stopak
2023-10-22 6:52 ` Dragan Simic
2023-10-22 5:52 ` Jacob Stopak
2023-10-22 6:38 ` Dragan Simic
2023-10-22 10:30 ` Oswald Buddenhagen
2023-10-22 12:55 ` Dragan Simic
2023-10-23 10:52 ` Oswald Buddenhagen
2023-10-23 14:34 ` Dragan Simic
2023-10-23 17:30 ` Jacob Stopak
2023-10-23 17:59 ` Dragan Simic
2023-10-23 18:16 ` Oswald Buddenhagen
2023-10-23 19:29 ` Jacob Stopak
2023-10-23 20:19 ` Oswald Buddenhagen
2023-10-23 20:51 ` Dragan Simic
2023-10-23 21:14 ` Oswald Buddenhagen
2023-10-23 21:19 ` Dragan Simic
2023-10-23 23:17 ` Jacob Stopak
2023-10-24 1:10 ` Dragan Simic
2023-10-24 2:03 ` Junio C Hamano
2023-10-24 2:21 ` Dragan Simic
2024-01-05 19:14 ` Dragan Simic
2024-01-06 4:44 ` Jacob Stopak
2024-01-06 7:06 ` Dragan Simic
2023-10-23 20:29 ` Dragan Simic
2023-10-23 19:01 ` Junio C Hamano
2023-10-23 19:04 ` Dragan Simic
2023-10-23 20:47 ` Oswald Buddenhagen
2023-10-23 20:59 ` Dragan Simic
2023-10-23 21:23 ` Jacob Stopak
2023-10-23 21:26 ` Dragan Simic
2023-10-23 21:12 ` Jacob Stopak
2023-10-22 15:50 ` Jacob Stopak
2023-10-26 22:46 ` Jacob Stopak [this message]
2023-10-26 22:46 ` [RFC PATCH v2 1/6] status: add noob format from status.noob config Jacob Stopak
2023-10-30 1:32 ` Junio C Hamano
2023-10-30 1:38 ` Dragan Simic
2023-10-30 6:06 ` Jacob Stopak
2023-10-26 22:46 ` [RFC PATCH v2 2/6] status: handle long paths in noob format Jacob Stopak
2023-10-26 22:46 ` [RFC PATCH v2 3/6] add: implement noob mode Jacob Stopak
2023-10-26 22:46 ` [RFC PATCH v2 4/6] add: set unique color for noob mode arrows Jacob Stopak
2023-10-26 22:46 ` [RFC PATCH v2 5/6] restore: implement noob mode Jacob Stopak
2023-10-26 22:46 ` [RFC PATCH v2 6/6] status: add advice status hints as table footer Jacob Stopak
2023-10-27 13:32 ` [RFC PATCH v2 0/6] Noobify format for status, add, restore Dragan Simic
2023-10-27 17:13 ` Jacob Stopak
2023-10-28 0:06 ` Dragan Simic
2023-10-28 2:52 ` Jacob Stopak
2023-10-28 5:55 ` Dragan Simic
2023-10-28 15:21 ` Jacob Stopak
2023-10-28 16:20 ` Dragan Simic
2023-10-28 17:35 ` Jacob Stopak
2023-10-28 17:41 ` Dragan Simic
2023-10-28 18:05 ` Jacob Stopak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231026224615.675172-1-jacob@initialcommit.io \
--to=jacob@initialcommit.io \
--cc=dsimic@manjaro.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=oswald.buddenhagen@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).