timbrel / GitSavvy

Full git and GitHub integration with Sublime Text
MIT License
1.9k stars 135 forks source link

git stash show: show stat only #1867

Open franciscolourenco opened 5 months ago

franciscolourenco commented 5 months ago

In the cli, by default, git stash show shows only the the stat of the stash:

$ git stash show
 .env.local.example                    |   1 +
 package-lock.json                     | 548 +++++++++++++++++++---------------
 package.json                          |   7 +-
 src/admin/components/views/Login.scss |  29 ++
 src/admin/components/views/Login.tsx  |  91 ++++++
 src/collections/Users.ts              |  52 +++-
 src/payload.config.ts                 |  26 +-
 src/server.ts                         |  14 +
 8 files changed, 513 insertions(+), 255 deletions(-)

I find this more useful than seeing the entire patch.

However, GitSavvy always shows the full patch view, and not the stat view. It also seems to ignore the git config for this command.

Would it be possible to make GitSavvy honor the git config, or to have an internal option to customize this behavior?

kaste commented 5 months ago

We can at least, the low hanging fruit, also show the diffstat. I don't hink I want to show only the stats as that's not particular in line of GitSavvy and being in a full editor. Curious about what you get from the stats actually?

franciscolourenco commented 5 months ago

@kaste that would already be an improvement.

My intent when showing a stash is getting an overview of what the stash contains before applying it. I do this from the status view usually. The standard git diff is not particularly useful in this case since it is too long.

If I want to find out what changes a stash has, I would pop it and inline diff each one of the files from the status view.