All of lore.kernel.org
 help / color / mirror / Atom feed
* [feature suggestion] Improve stash descriptions
@ 2021-04-23 21:16 Yuri
  2021-04-25 17:17 ` brian m. carlson
  0 siblings, 1 reply; 4+ messages in thread
From: Yuri @ 2021-04-23 21:16 UTC (permalink / raw)
  To: Git Mailing List

My current stash looks like this:

$ git stash list
stash@{0}: WIP on main: 12c63aaa3b13 www/yt-dlp: Update 2021.04.11 -> 
2021.04.22 Reported by: portscout
stash@{1}: WIP on main: 140f08246898 devel/py-PeachPy: Update g20180225 
-> 0.0.1
stash@{2}: WIP on main: d42e82e4a336 security/hs-cryptol: Update 2.10.0 
-> 2.11.0
stash@{3}: WIP on main: 62851ab415cd dns/subfinder: Update 2.4.6 -> 2.4.7
stash@{4}: WIP on main: 4eec712dfdae math/gretl: Correct PKGNAME to be 
2021a, not 2021.a to reflect how Gretl is versioned.
stash@{5}: WIP on main: 725e4e9a07f0 devel/py-fypp: Update 3.0 -> 3.1
stash@{6}: WIP on main: 200eb286c368 misc/py-orange3-educational: Update 
0.1.8 -> 0.4.0
stash@{7}: WIP on main: 364ab57861e2 misc/urh: Update 2.9.1 -> 2.9.2
stash@{8}: WIP on main: 52c6d02708d0 science/py-nilearn: Update 0.7.0 -> 
0.7.1
stash@{9}: WIP on main: a9d5d9e05bbf New port: biology/seqkit: 
Cross-platform and ultrafast toolkit for FASTA/Q file manipulation
stash@{10}: WIP on main: ffa307fb4dc3 games/iqpuzzle: Update 1.2.2 -> 1.2.3
stash@{11}: WIP on main: 195f2e27fd72 math/py-libpoly: Update 0.1.8 -> 0.1.9
stash@{12}: WIP on main: 4c2cc95952a6 graphics/mesa-devel: update to 
21.0.b.4390
stash@{13}: WIP on main: 4c2cc95952a6 graphics/mesa-devel: update to 
21.0.b.4390
stash@{14}: On main: audio/tuxguitar -- .
stash@{15}: On main: math/[py-]python-igraph

None of the above descriptions are relevant to actual items, for example:

$ git stash show stash@{2}
  devel/google-perftools/Makefile                      |  2 +-
  devel/google-perftools/distinfo                      |  6 +++---
  devel/google-perftools/files/patch-Makefile.am       |  4 ++--
  devel/google-perftools/files/patch-src_stacktrace.cc | 11 +++++++++++
  devel/google-perftools/pkg-plist                     | 12 ++++++------
  5 files changed, 23 insertions(+), 12 deletions(-)

- description mentions cryptol but actual items are related to perftools.


My suggestion:

In case all changes are grouped in one ditectory, like in my case, git 
should append this directory name to description:

 > stash@{2}: WIP on main: d42e82e4a336 security/hs-cryptol: Update 
2.10.0 -> 2.11.0, all changes are in devel/google-perftools


In many cases it is possible to do so.

In case many directories are affected it could say "changes are in 
path1/dir1, path2/dir2, etc."

This would be a lot better than stash items descriptions it prints now.


Thank you,

Yuri


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [feature suggestion] Improve stash descriptions
  2021-04-23 21:16 [feature suggestion] Improve stash descriptions Yuri
@ 2021-04-25 17:17 ` brian m. carlson
  2021-04-26  9:00   ` Ævar Arnfjörð Bjarmason
  0 siblings, 1 reply; 4+ messages in thread
From: brian m. carlson @ 2021-04-25 17:17 UTC (permalink / raw)
  To: Yuri; +Cc: Git Mailing List

[-- Attachment #1: Type: text/plain, Size: 3368 bytes --]

On 2021-04-23 at 21:16:38, Yuri wrote:
> My current stash looks like this:
> 
> $ git stash list
> stash@{0}: WIP on main: 12c63aaa3b13 www/yt-dlp: Update 2021.04.11 ->
> 2021.04.22 Reported by: portscout
> stash@{1}: WIP on main: 140f08246898 devel/py-PeachPy: Update g20180225 ->
> 0.0.1
> stash@{2}: WIP on main: d42e82e4a336 security/hs-cryptol: Update 2.10.0 ->
> 2.11.0
> stash@{3}: WIP on main: 62851ab415cd dns/subfinder: Update 2.4.6 -> 2.4.7
> stash@{4}: WIP on main: 4eec712dfdae math/gretl: Correct PKGNAME to be
> 2021a, not 2021.a to reflect how Gretl is versioned.
> stash@{5}: WIP on main: 725e4e9a07f0 devel/py-fypp: Update 3.0 -> 3.1
> stash@{6}: WIP on main: 200eb286c368 misc/py-orange3-educational: Update
> 0.1.8 -> 0.4.0
> stash@{7}: WIP on main: 364ab57861e2 misc/urh: Update 2.9.1 -> 2.9.2
> stash@{8}: WIP on main: 52c6d02708d0 science/py-nilearn: Update 0.7.0 ->
> 0.7.1
> stash@{9}: WIP on main: a9d5d9e05bbf New port: biology/seqkit:
> Cross-platform and ultrafast toolkit for FASTA/Q file manipulation
> stash@{10}: WIP on main: ffa307fb4dc3 games/iqpuzzle: Update 1.2.2 -> 1.2.3
> stash@{11}: WIP on main: 195f2e27fd72 math/py-libpoly: Update 0.1.8 -> 0.1.9
> stash@{12}: WIP on main: 4c2cc95952a6 graphics/mesa-devel: update to
> 21.0.b.4390
> stash@{13}: WIP on main: 4c2cc95952a6 graphics/mesa-devel: update to
> 21.0.b.4390
> stash@{14}: On main: audio/tuxguitar -- .
> stash@{15}: On main: math/[py-]python-igraph
> 
> None of the above descriptions are relevant to actual items, for example:
> 
> $ git stash show stash@{2}
>  devel/google-perftools/Makefile                      |  2 +-
>  devel/google-perftools/distinfo                      |  6 +++---
>  devel/google-perftools/files/patch-Makefile.am       |  4 ++--
>  devel/google-perftools/files/patch-src_stacktrace.cc | 11 +++++++++++
>  devel/google-perftools/pkg-plist                     | 12 ++++++------
>  5 files changed, 23 insertions(+), 12 deletions(-)
> 
> - description mentions cryptol but actual items are related to perftools.

Right.  The format here is "WIP on BRANCH: REVISION DESCRIPTION", where
REVISION and DESCRIPTION correspond to the latest commit on the branch.

I agree that in many situations this is an unhelpful message, which is
why git stash push takes a --message argument so you can specify a
different message.  That, of course, does require that you use it, and
I will admit that even I don't always do that, sometimes much to the
dismay of later me.

> In case all changes are grouped in one ditectory, like in my case, git
> should append this directory name to description:
> 
> > stash@{2}: WIP on main: d42e82e4a336 security/hs-cryptol: Update 2.10.0 ->
> 2.11.0, all changes are in devel/google-perftools
> 
> 
> In many cases it is possible to do so.
> 
> In case many directories are affected it could say "changes are in
> path1/dir1, path2/dir2, etc."

This is unfortunately not going to be very efficient to compute in
certain cases, such as with large working trees where there are many
changes.  So while it would improve the automated stash message, it
might also make stashing much slower on large repositories.
-- 
brian m. carlson (he/him or they/them)
Houston, Texas, US

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [feature suggestion] Improve stash descriptions
  2021-04-25 17:17 ` brian m. carlson
@ 2021-04-26  9:00   ` Ævar Arnfjörð Bjarmason
  2021-04-26 16:14     ` Jeff King
  0 siblings, 1 reply; 4+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2021-04-26  9:00 UTC (permalink / raw)
  To: brian m. carlson; +Cc: Yuri, Git Mailing List


On Sun, Apr 25 2021, brian m. carlson wrote:

> [[PGP Signed Part:Undecided]]
> On 2021-04-23 at 21:16:38, Yuri wrote:
>> My current stash looks like this:
>> 
>> $ git stash list
>> stash@{0}: WIP on main: 12c63aaa3b13 www/yt-dlp: Update 2021.04.11 ->
>> 2021.04.22 Reported by: portscout
>> stash@{1}: WIP on main: 140f08246898 devel/py-PeachPy: Update g20180225 ->
>> 0.0.1
>> stash@{2}: WIP on main: d42e82e4a336 security/hs-cryptol: Update 2.10.0 ->
>> 2.11.0
>> stash@{3}: WIP on main: 62851ab415cd dns/subfinder: Update 2.4.6 -> 2.4.7
>> stash@{4}: WIP on main: 4eec712dfdae math/gretl: Correct PKGNAME to be
>> 2021a, not 2021.a to reflect how Gretl is versioned.
>> stash@{5}: WIP on main: 725e4e9a07f0 devel/py-fypp: Update 3.0 -> 3.1
>> stash@{6}: WIP on main: 200eb286c368 misc/py-orange3-educational: Update
>> 0.1.8 -> 0.4.0
>> stash@{7}: WIP on main: 364ab57861e2 misc/urh: Update 2.9.1 -> 2.9.2
>> stash@{8}: WIP on main: 52c6d02708d0 science/py-nilearn: Update 0.7.0 ->
>> 0.7.1
>> stash@{9}: WIP on main: a9d5d9e05bbf New port: biology/seqkit:
>> Cross-platform and ultrafast toolkit for FASTA/Q file manipulation
>> stash@{10}: WIP on main: ffa307fb4dc3 games/iqpuzzle: Update 1.2.2 -> 1.2.3
>> stash@{11}: WIP on main: 195f2e27fd72 math/py-libpoly: Update 0.1.8 -> 0.1.9
>> stash@{12}: WIP on main: 4c2cc95952a6 graphics/mesa-devel: update to
>> 21.0.b.4390
>> stash@{13}: WIP on main: 4c2cc95952a6 graphics/mesa-devel: update to
>> 21.0.b.4390
>> stash@{14}: On main: audio/tuxguitar -- .
>> stash@{15}: On main: math/[py-]python-igraph
>> 
>> None of the above descriptions are relevant to actual items, for example:
>> 
>> $ git stash show stash@{2}
>>  devel/google-perftools/Makefile                      |  2 +-
>>  devel/google-perftools/distinfo                      |  6 +++---
>>  devel/google-perftools/files/patch-Makefile.am       |  4 ++--
>>  devel/google-perftools/files/patch-src_stacktrace.cc | 11 +++++++++++
>>  devel/google-perftools/pkg-plist                     | 12 ++++++------
>>  5 files changed, 23 insertions(+), 12 deletions(-)
>> 
>> - description mentions cryptol but actual items are related to perftools.
>
> Right.  The format here is "WIP on BRANCH: REVISION DESCRIPTION", where
> REVISION and DESCRIPTION correspond to the latest commit on the branch.
>
> I agree that in many situations this is an unhelpful message, which is
> why git stash push takes a --message argument so you can specify a
> different message.  That, of course, does require that you use it, and
> I will admit that even I don't always do that, sometimes much to the
> dismay of later me.
>
>> In case all changes are grouped in one ditectory, like in my case, git
>> should append this directory name to description:
>> 
>> > stash@{2}: WIP on main: d42e82e4a336 security/hs-cryptol: Update 2.10.0 ->
>> 2.11.0, all changes are in devel/google-perftools
>> 
>> 
>> In many cases it is possible to do so.
>> 
>> In case many directories are affected it could say "changes are in
>> path1/dir1, path2/dir2, etc."
>
> This is unfortunately not going to be very efficient to compute in
> certain cases, such as with large working trees where there are many
> changes.  So while it would improve the automated stash message, it
> might also make stashing much slower on large repositories.

Just to add to this, there's already:

    git stash list [--stat|--numstat|--shortstat]

It seems to me that what's being requested here is not so much a
stash-specific feature, but some abbreviated "human readable" stat
format that could be used with any log-like command.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [feature suggestion] Improve stash descriptions
  2021-04-26  9:00   ` Ævar Arnfjörð Bjarmason
@ 2021-04-26 16:14     ` Jeff King
  0 siblings, 0 replies; 4+ messages in thread
From: Jeff King @ 2021-04-26 16:14 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason
  Cc: brian m. carlson, Yuri, Git Mailing List

On Mon, Apr 26, 2021 at 11:00:57AM +0200, Ævar Arnfjörð Bjarmason wrote:

> >> In case many directories are affected it could say "changes are in
> >> path1/dir1, path2/dir2, etc."
> >
> > This is unfortunately not going to be very efficient to compute in
> > certain cases, such as with large working trees where there are many
> > changes.  So while it would improve the automated stash message, it
> > might also make stashing much slower on large repositories.
> 
> Just to add to this, there's already:
> 
>     git stash list [--stat|--numstat|--shortstat]
> 
> It seems to me that what's being requested here is not so much a
> stash-specific feature, but some abbreviated "human readable" stat
> format that could be used with any log-like command.

There's also --dirstat, which will summarize the impacted directories
(though it does not say much useful if the entries are all in the root,
as they typically are for git.git).

-Peff

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-04-26 16:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-23 21:16 [feature suggestion] Improve stash descriptions Yuri
2021-04-25 17:17 ` brian m. carlson
2021-04-26  9:00   ` Ævar Arnfjörð Bjarmason
2021-04-26 16:14     ` Jeff King

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.