diff mbox series

git-completion.bash: Add completion for stash list

Message ID ef5e9e8da180a5ead70b53d767a8ed4a0666e598.camel@lonetwin.net (mailing list archive)
State New, archived
Headers show
Series git-completion.bash: Add completion for stash list | expand

Commit Message

Steve Sept. 27, 2018, 7:59 p.m. UTC
Since stash list accepts git-log options, add the following useful
options that make sense in the context of the `git stash list` command:

  --name-status --oneline --patch-with-stat

Signed-off-by: Steven Fernandez <steve@lonetwin.net>
---

This is my first patch to the project so please be excuse any process
errors.
Although, I've tried my best to follow the guidelines in
Documentation/SubmittingPatches but I'm not sure if I missed anything.

 contrib/completion/git-completion.bash | 3 +++
 1 file changed, 3 insertions(+)

 		branch,*)

Comments

Junio C Hamano Oct. 7, 2018, 1:08 a.m. UTC | #1
Steve <steve@lonetwin.net> writes:

> Since stash list accepts git-log options, add the following useful
> options that make sense in the context of the `git stash list` command:
>
>   --name-status --oneline --patch-with-stat
>
> Signed-off-by: Steven Fernandez <steve@lonetwin.net>
> ---
>
> This is my first patch to the project so please be excuse any process
> errors.
> Although, I've tried my best to follow the guidelines in
> Documentation/SubmittingPatches but I'm not sure if I missed anything.

Thanks.  Will queue with manual fix-ups, but since you asked, here
are the things I'll be fixing up manually, which you may want to
avoid next time.

 (1) We strongly prefer to see contributor's identity recorded as
     the "author" of a commit to match the sign-off from the
     contributor.  Your MSA sent your message with only the more
     casual version of your first name on the "From: " header, which
     does not match your sign-off.  It would have been more correct
     if you added two lines at the beginning of the body of the
     message, i.e. before "Since stash list accepts...".  The first
     line would be

	From: Steven Fernandez <steve@lonetwin.net>

     and then you would have a blank line immediately after that.
     Your "Since stash list accepts..." would become the third line
     of the body.  That will tell the receiving end that the author
     identity of the resulting commit should not be "Steve" but
     should be "Steven Fernandez".

 (2) "git shortlog --no-merges" would show that we tend not to
     capitalize the first word after "<area>:" on the subject line.

 (3) Your patch is line-wrapped (see below that has with-stat on its
     own line after the line you intended it to go).

 (4) You somehow generated your patch with "-p0".  It is OK to do
     whatever for your own use, but patch submission is 
     communication with others, so don't be original by doing
     unusual things.

None of the above is something I cannot fix on the receiving end
myself, but at the same time, it is not something people should be
wasting maintainer's time on, and small wastes add up.

>  contrib/completion/git-completion.bash | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git contrib/completion/git-completion.bash
> contrib/completion/git-completion.bash
> index d63d2dffd..06ec6ca11 100644
> --- contrib/completion/git-completion.bash
> +++ contrib/completion/git-completion.bash
> @@ -2567,6 +2567,9 @@ _git_stash ()
>  		drop,--*)
>  			__gitcomp "--quiet"
>  			;;
> +		list,--*)
> +			__gitcomp "--name-status --oneline --patch-
> with-stat"
> +			;;
>  		show,--*|branch,--*)
>  			;;
>  		branch,*)
Steve Oct. 10, 2018, 1:34 p.m. UTC | #2
On 2018-10-07 2:08 am, Junio C Hamano wrote:
> Steve <steve@lonetwin.net> writes:
> 
>> Since stash list accepts git-log options, add the following useful
>> options that make sense in the context of the `git stash list` 
>> command:
>> 
>>   --name-status --oneline --patch-with-stat
>> 
>> Signed-off-by: Steven Fernandez <steve@lonetwin.net>
>> ---
>> 
>> This is my first patch to the project so please be excuse any process
>> errors.
>> Although, I've tried my best to follow the guidelines in
>> Documentation/SubmittingPatches but I'm not sure if I missed anything.
> 
> Thanks.  Will queue with manual fix-ups, but since you asked, here
> are the things I'll be fixing up manually, which you may want to
> avoid next time.
> 

Thanks for accepting the patchset and the manual fixes. Thanks a lot 
also
for taking the time to explain the mistakes to avoid.

cheers,
Steve
diff mbox series

Patch

diff --git contrib/completion/git-completion.bash
contrib/completion/git-completion.bash
index d63d2dffd..06ec6ca11 100644
--- contrib/completion/git-completion.bash
+++ contrib/completion/git-completion.bash
@@ -2567,6 +2567,9 @@  _git_stash ()
 		drop,--*)
 			__gitcomp "--quiet"
 			;;
+		list,--*)
+			__gitcomp "--name-status --oneline --patch-
with-stat"
+			;;
 		show,--*|branch,--*)
 			;;