git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] bash-completion: add git-prune into bash completion
@ 2020-06-22  0:13 John Lin via GitGitGadget
  2020-06-22 18:28 ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: John Lin via GitGitGadget @ 2020-06-22  0:13 UTC (permalink / raw)
  To: git; +Cc: John Lin, John Lin

From: John Lin <johnlinp@gmail.com>

Sometimes git would suggest the user to run `git prune` when there are
too many unreachable loose objects. It's more user-friendly if we add
git-prune into bash completion.

Signed-off-by: John Lin <johnlinp@gmail.com>
---
    bash-completion: add git-prune into bash completion
    
    Sometimes git would suggest the user to run git prune when there are too
    many unreachable loose objects. It's more user-friendly if we add
    git-prune into bash completion.
    
    Signed-off-by: John Lin johnlinp@gmail.com [johnlinp@gmail.com]
    
    Fixes #642.

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-667%2Fjohnlinp%2Fadd-git-prune-bash-completion-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-667/johnlinp/add-git-prune-bash-completion-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/667

 command-list.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/command-list.txt b/command-list.txt
index cbb960c8436..89aa60cde7e 100644
--- a/command-list.txt
+++ b/command-list.txt
@@ -136,7 +136,7 @@ git-pack-redundant                      plumbinginterrogators
 git-pack-refs                           ancillarymanipulators
 git-parse-remote                        synchelpers
 git-patch-id                            purehelpers
-git-prune                               ancillarymanipulators
+git-prune                               ancillarymanipulators   complete
 git-prune-packed                        plumbingmanipulators
 git-pull                                mainporcelain           remote
 git-push                                mainporcelain           remote

base-commit: 101b3204f37606972b40fc17dec84560c22f69f6
-- 
gitgitgadget

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

* Re: [PATCH] bash-completion: add git-prune into bash completion
  2020-06-22  0:13 [PATCH] bash-completion: add git-prune into bash completion John Lin via GitGitGadget
@ 2020-06-22 18:28 ` Junio C Hamano
  2020-07-10  1:18   ` 林自均
  0 siblings, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2020-06-22 18:28 UTC (permalink / raw)
  To: John Lin via GitGitGadget; +Cc: git, John Lin

"John Lin via GitGitGadget" <gitgitgadget@gmail.com> writes:

> From: John Lin <johnlinp@gmail.com>
>
> Sometimes git would suggest the user to run `git prune` when there are
> too many unreachable loose objects. It's more user-friendly if we add
> git-prune into bash completion.

Yes, but it does not suggest all the time, and there is a reason.
Most of the time "gc" is more appropriate, but there are narrow
cases where "prune" is more appropriate and that is when the users
will see suggestion to run "prune".

Isn't it too much to type p-r-u-n-e while seeing that message,
typing as you read it?

I do not think it hurts to complete "git prune", in the sense that
we would want to avoid completing potentially destructive operation
to those who do not understand the implications, because the command
is pretty much benign.  But I am not sure it forces users to type
too many keystrokes too frequently that it requires a tab
completion.  I dunno.

Will queue for now.

Thanks.

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

* Re: [PATCH] bash-completion: add git-prune into bash completion
  2020-06-22 18:28 ` Junio C Hamano
@ 2020-07-10  1:18   ` 林自均
  2020-07-10 23:08     ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: 林自均 @ 2020-07-10  1:18 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: John Lin via GitGitGadget, Git

Hi Junio,

I saw this integrated into master. Thanks.

Best,
John Lin

Junio C Hamano <gitster@pobox.com> 於 2020年6月23日 週二 上午2:28寫道:
>
> "John Lin via GitGitGadget" <gitgitgadget@gmail.com> writes:
>
> > From: John Lin <johnlinp@gmail.com>
> >
> > Sometimes git would suggest the user to run `git prune` when there are
> > too many unreachable loose objects. It's more user-friendly if we add
> > git-prune into bash completion.
>
> Yes, but it does not suggest all the time, and there is a reason.
> Most of the time "gc" is more appropriate, but there are narrow
> cases where "prune" is more appropriate and that is when the users
> will see suggestion to run "prune".
>
> Isn't it too much to type p-r-u-n-e while seeing that message,
> typing as you read it?
>
> I do not think it hurts to complete "git prune", in the sense that
> we would want to avoid completing potentially destructive operation
> to those who do not understand the implications, because the command
> is pretty much benign.  But I am not sure it forces users to type
> too many keystrokes too frequently that it requires a tab
> completion.  I dunno.
>
> Will queue for now.
>
> Thanks.

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

* Re: [PATCH] bash-completion: add git-prune into bash completion
  2020-07-10  1:18   ` 林自均
@ 2020-07-10 23:08     ` Junio C Hamano
  0 siblings, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2020-07-10 23:08 UTC (permalink / raw)
  To: 林自均; +Cc: John Lin via GitGitGadget, Git

林自均 <johnlinp@gmail.com> writes:

> Hi Junio,
>
> I saw this integrated into master. Thanks.

Thank you for writing the patch.

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

end of thread, other threads:[~2020-07-10 23:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-22  0:13 [PATCH] bash-completion: add git-prune into bash completion John Lin via GitGitGadget
2020-06-22 18:28 ` Junio C Hamano
2020-07-10  1:18   ` 林自均
2020-07-10 23:08     ` Junio C Hamano

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).