From: Stefan Beller <hidden> Date: 2017-10-24 15:32:37
On Tue, Oct 24, 2017 at 8:15 AM, Max Rothman [off-list ref] wrote:
Just re-discovered this in my inbox. So is this worth fixing? I could
(probably) figure out a patch.
Thanks,
Max
$ git log -- <TAB>
Display all 100 possibilities? (y or n)
I guess adding one more option is no big deal, so go for it!
We also have a couple --no-options already (as you said earlier),
which I think makes it even more viable.
Tangent:
I wonder if we can cascade the completion by common
prefixes, e.g. --no- or --ignore- occurs a couple of times,
such that we could only show these --no- once and only
if you try autocompleting thereafter you get all --no- options.
Thanks for reviving this thread!
Stefan
From: Max Rothman <hidden> Date: 2017-11-02 20:25:43
No problem! Let me know if I've done something wrong with this patch,
I'm new to git's contributor process.
completion: add missing completions for log, diff, show
* Add bash completion for the missing --no-* options on git log
* Add bash completion for --textconv and --indent-heuristic families to
git diff and all commands that use diff's options
* Add bash completion for --no-abbrev-commit, --expand-tabs, and
--no-expand-tabs to git show
---
contrib/completion/git-completion.bash | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
On Tue, Oct 24, 2017 at 11:32 AM, Stefan Beller [off-list ref] wrote:
On Tue, Oct 24, 2017 at 8:15 AM, Max Rothman [off-list ref] wrote:
quoted
Just re-discovered this in my inbox. So is this worth fixing? I could
(probably) figure out a patch.
Thanks,
Max
$ git log -- <TAB>
Display all 100 possibilities? (y or n)
I guess adding one more option is no big deal, so go for it!
We also have a couple --no-options already (as you said earlier),
which I think makes it even more viable.
Tangent:
I wonder if we can cascade the completion by common
prefixes, e.g. --no- or --ignore- occurs a couple of times,
such that we could only show these --no- once and only
if you try autocompleting thereafter you get all --no- options.
Thanks for reviving this thread!
Stefan
From: Stefan Beller <hidden> Date: 2017-11-02 21:20:02
On Thu, Nov 2, 2017 at 1:25 PM, Max Rothman [off-list ref] wrote:
No problem! Let me know if I've done something wrong with this patch,
I'm new to git's contributor process.
Thanks for coming up with a patch!
Yeah, the contribution process has some initial road blocks;
I'll point them out below.
completion: add missing completions for log, diff, show
I would think this is a good commit subject as it describes
the changes made superficially
* Add bash completion for the missing --no-* options on git log
* Add bash completion for --textconv and --indent-heuristic families to
git diff and all commands that use diff's options
* Add bash completion for --no-abbrev-commit, --expand-tabs, and
--no-expand-tabs to git show
This describes what happens in this patch, but not why, which helps
future readers of commit message more than the "what".
I'm also just guessing but maybe:
A user might have configured a repo to show diffs in a certain way,
add the --no-* options to the autocompletion to override it easier
from the command line.
New in this patch is autocompletion for --textconv as well as abbreviation
options as that needs to be flipped all the time in <example workflow>.
I wonder if we really want to expose indent-heuristic,
I guess by not having it experimental any more it makes sense to do so.
c.f. https://public-inbox.org/git/20171029151228.607834-1-cmn@dwim.me/
At the end of a commit message, the Git project requires a sign off.
(See section (5) in Documentation/SubmittingPatches;
tl;dr: add Signed-off-by: NAME <EMAIL> if you can agree to
https://developercertificate.org/)
The patch looks good, but doesn't apply because the email contains
white spaces instead of tabs. Maybe try https://submitgit.herokuapp.com/
(or fix/change your email client to send a patch; the gmail web interface
doesn't work. I personally got 'git send-email' up and running;
The Documentation/SubmittingPatches has a section on email clients, too)
Thanks,
Stefan
From: Max Rothman <hidden> Date: 2017-11-07 20:32:18
Thanks for the feedback!
quoted
* Add bash completion for the missing --no-* options on git log
* Add bash completion for --textconv and --indent-heuristic families to
git diff and all commands that use diff's options
* Add bash completion for --no-abbrev-commit, --expand-tabs, and
--no-expand-tabs to git show
This describes what happens in this patch, but not why, which helps
future readers of commit message more than the "what".
How about:
Teach git-log tab completion about the --no-* options for ease of use
at the command line.
Similarly, teach git-show tab completion about the --no-abbrev-commit,
--expand-tabs, and --no-expand-tabs options.
Also, teach git-diff (and all commands that use its options) tab
completion about the --textconv and --indent-heuristic families of
options. --indent-heuristic is no longer experimental, so there's no
reason it should be left out of tab completion any more, and textconv
seems to have simply been missed.
At the end of a commit message, the Git project requires a sign off.
(See section (5) in Documentation/SubmittingPatches;
tl;dr: add Signed-off-by: NAME <EMAIL> if you can agree to
https://developercertificate.org/)
So the sign-off should include my name and email? I thought it was
supposed to be the person who approved the patch, but I must've gotten
confused.
The patch looks good, but doesn't apply because the email contains
white spaces instead of tabs. Maybe try https://submitgit.herokuapp.com/
(or fix/change your email client to send a patch; the gmail web interface
doesn't work. I personally got 'git send-email' up and running;
The Documentation/SubmittingPatches has a section on email clients, too)
Yeah, I was using the gmail interface. I'll give the heroku app a go.
It has an option for sending a message in reply to another, and I
assume I should send it in reply to this thread. Do you know how to
tell what the appropriate ID to use is? Looking through the raw email,
I see several, so it's not obvious to me which to use.
Thanks,
Max
From: Stefan Beller <hidden> Date: 2017-11-07 20:48:20
On Tue, Nov 7, 2017 at 12:31 PM, Max Rothman [off-list ref] wrote:
Thanks for the feedback!
quoted
quoted
* Add bash completion for the missing --no-* options on git log
* Add bash completion for --textconv and --indent-heuristic families to
git diff and all commands that use diff's options
* Add bash completion for --no-abbrev-commit, --expand-tabs, and
--no-expand-tabs to git show
This describes what happens in this patch, but not why, which helps
future readers of commit message more than the "what".
How about:
quoted
Teach git-log tab completion about the --no-* options for ease of use
at the command line.
Similarly, teach git-show tab completion about the --no-abbrev-commit,
--expand-tabs, and --no-expand-tabs options.
Also, teach git-diff (and all commands that use its options) tab
completion about the --textconv and --indent-heuristic families of
options. --indent-heuristic is no longer experimental, so there's no
reason it should be left out of tab completion any more, and textconv
seems to have simply been missed.
Sounds good to me.
quoted
At the end of a commit message, the Git project requires a sign off.
(See section (5) in Documentation/SubmittingPatches;
tl;dr: add Signed-off-by: NAME <EMAIL> if you can agree to
https://developercertificate.org/)
So the sign-off should include my name and email? I thought it was
supposed to be the person who approved the patch, but I must've gotten
confused.
Anyone touching the patch needs to sign off on it. So when you write it,
you sign off (thereby certifying that you are legally allowed to write
the patch.
For example you may be employed and the work contract requires you to
not work on side projects, or the intellectual property belongs to the employer
or such).
Hypothetically you could send it to Git-for-Windows which happens to
be a fork of git. The maintainer of GfW would gladly accept your patch,
(and also sign it off, thereby certifying he can touch it legally).
Thereafter someone such as a regular contributor from the git project
could spot the difference in GfW and git, and they would want to bring it
to "the real git", so they would make a patch out of the commit in GfW.
Additionally to the 2 sign offs, this contributor would also need to sign
off on the patch, saying it is legal what they do. And then that patch could
be picked up by the maintainer for the regular git. After that journey the
patch would have 4 sign offs, indicating the way of travel, i.e. how
it reached git finally.
An example of a longer sign off chain is 89dd32aedc
(check-ref-format doc: --branch validates and expands <branch>, 2017-10-17)
and apparently Jeff helped Junio to author a patch; Jonathan took that
patch and changed a thing, only to send it back to Junio, who then applied
it to git.
quoted
The patch looks good, but doesn't apply because the email contains
white spaces instead of tabs. Maybe try https://submitgit.herokuapp.com/
(or fix/change your email client to send a patch; the gmail web interface
doesn't work. I personally got 'git send-email' up and running;
The Documentation/SubmittingPatches has a section on email clients, too)
Yeah, I was using the gmail interface. I'll give the heroku app a go.
It has an option for sending a message in reply to another, and I
assume I should send it in reply to this thread. Do you know how to
tell what the appropriate ID to use is? Looking through the raw email,
I see several, so it's not obvious to me which to use.
From: Max Rothman <hidden> Date: 2017-11-07 21:22:53
From: Max Rothman <redacted>
Teach git-log tab completion about the --no-* options for ease of use
at the command line.
Similarly, teach git-show tab completion about the --no-abbrev-commit,
--expand-tabs, and --no-expand-tabs options.
Also, teach git-diff (and all commands that use its options) tab
completion about the --textconv and --indent-heuristic families of
options. --indent-heuristic is no longer experimental, so there's no
reason it should be left out of tab completion any more, and textconv
seems to have simply been missed.
---
contrib/completion/git-completion.bash | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
From: Max Rothman <hidden> Date: 2019-07-02 01:56:29
The bash completion script knows some options to "git log" and
"git show" only in the positive form, (e.g. "--abbrev-commit"), but not
in their negative form (e.g. "--no-abbrev-commit"). Add them.
Also, the bash completion script is missing some other options to
"git diff", and "git show" (and thus, all other commands that take
"git diff"'s options). Add them. Of note, since "--indent-heuristic" is
no longer experimental, add that too.
Signed-off-by: Max Rothman <redacted>
---
contrib/completion/git-completion.bash | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
From: Max Rothman <hidden> Date: 2019-08-02 00:54:18
Ping :)
On Thu, Aug 1, 2019 at 8:50 PM Max Rothman [off-list ref] wrote:
quoted hunk
The bash completion script knows some options to "git log" and
"git show" only in the positive form, (e.g. "--abbrev-commit"), but not
in their negative form (e.g. "--no-abbrev-commit"). Add them.
Also, the bash completion script is missing some other options to
"git diff", and "git show" (and thus, all other commands that take
"git diff"'s options). Add them. Of note, since "--indent-heuristic" is
no longer experimental, add that too.
Signed-off-by: Max Rothman <redacted>
---
contrib/completion/git-completion.bash | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
From: Max Rothman <hidden> Date: 2019-09-11 18:15:15
Just pinging again, I'd love to move this forward!
On Thu, Aug 1, 2019 at 8:54 PM Max Rothman [off-list ref] wrote:
Ping :)
On Thu, Aug 1, 2019 at 8:50 PM Max Rothman [off-list ref] wrote:
quoted
The bash completion script knows some options to "git log" and
"git show" only in the positive form, (e.g. "--abbrev-commit"), but not
in their negative form (e.g. "--no-abbrev-commit"). Add them.
Also, the bash completion script is missing some other options to
"git diff", and "git show" (and thus, all other commands that take
"git diff"'s options). Add them. Of note, since "--indent-heuristic" is
no longer experimental, add that too.
Signed-off-by: Max Rothman <redacted>
---
contrib/completion/git-completion.bash | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
From: Johannes Schindelin <hidden> Date: 2019-09-12 08:54:40
Hi Max,
The patch looks good to me!
Thanks,
Johannes
On Wed, 11 Sep 2019, Max Rothman wrote:
On Thu, Aug 1, 2019 at 8:54 PM Max Rothman [off-list ref] wrote:
quoted
On Thu, Aug 1, 2019 at 8:50 PM Max Rothman [off-list ref] wrote:
quoted
The bash completion script knows some options to "git log" and
"git show" only in the positive form, (e.g. "--abbrev-commit"), but not
in their negative form (e.g. "--no-abbrev-commit"). Add them.
Also, the bash completion script is missing some other options to
"git diff", and "git show" (and thus, all other commands that take
"git diff"'s options). Add them. Of note, since "--indent-heuristic" is
no longer experimental, add that too.
Signed-off-by: Max Rothman <redacted>
---
contrib/completion/git-completion.bash | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)