git-rebase.sh contains:
if test "$action" = "edit-todo" && test "$type" != "interactive"
then
die "$(gettext "The --edit-todo action can only be used during interactive rebase.")"
fi
I wonder if it's worth doing a similar check here, which presumably
means testing if "$dir"/interactive exists.
From: Thomas Braun <hidden> Date: 2016-06-15 23:05:54
Signed-off-by: Thomas Braun <redacted>
---
John Keeping [off-list ref] hat am 13. Juli 2015 um 15:11 geschrieben:
git-rebase.sh contains:
if test "$action" = "edit-todo" && test "$type" != "interactive"
then
die "$(gettext "The --edit-todo action can only be used during interactive
rebase.")"
fi
I wonder if it's worth doing a similar check here, which presumably
means testing if "$dir"/interactive exists.
Good point. Thanks for the hint.
contrib/completion/git-completion.bash | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
From: SZEDER Gábor <hidden> Date: 2016-06-15 23:05:57
Quoting Thomas Braun [off-list ref]:
Signed-off-by: Thomas Braun <redacted>
---
quoted
John Keeping [off-list ref] hat am 13. Juli 2015 um 15:11 geschrieben:
git-rebase.sh contains:
if test "$action" = "edit-todo" && test "$type" != "interactive"
then
die "$(gettext "The --edit-todo action can only be used during interactive
rebase.")"
fi
I wonder if it's worth doing a similar check here, which presumably
means testing if "$dir"/interactive exists.
Good point. Thanks for the hint.
Perhaps the subject line could say "completion: offer '--edit-todo'
during interactive rebase" to be a bit more specific.
{
local dir="$(__gitdir)"
if [ -d "$dir"/rebase-apply ] || [ -d "$dir"/rebase-merge ]; then
- __gitcomp "--continue --skip --abort"
+ if [ -d "$dir"/interactive ]; then
This doesn't work for me, I think it looks for the right file at the
wrong place. During an interactive rebase I have no
'.git/interactive' file but a '.git/rebase-merge/interactive', so I
never get '--edit-todo'.
After some playing around and a cursory look at the source it seems to
me that I have '.git/rebase-apply' during a "regular" rebase and
'.git/rebase-merge' during an interactive rebase, and git-rebase.sh
checks the presence of the 'interactive' file only in
'.git/rebase-merge'. It's not clear to me yet whether it's possible
to have a '.git/rebase-merge' without the file 'interactive' in it.
If it is possible, then I'd like to know with which commands and under
what circumstances. If it isn't, then we wouldn't have to look for
the file at all, because checking the presence of the directory would
be enough.
Best,
Gábor
From: John Keeping <hidden> Date: 2016-06-15 23:05:57
On Thu, Jul 30, 2015 at 01:24:03PM +0200, SZEDER Gábor wrote:
Quoting Thomas Braun [off-list ref]:
quoted
Signed-off-by: Thomas Braun <redacted>
---
quoted
John Keeping [off-list ref] hat am 13. Juli 2015 um 15:11 geschrieben:
git-rebase.sh contains:
if test "$action" = "edit-todo" && test "$type" != "interactive"
then
die "$(gettext "The --edit-todo action can only be used during interactive
rebase.")"
fi
I wonder if it's worth doing a similar check here, which presumably
means testing if "$dir"/interactive exists.
Good point. Thanks for the hint.
Perhaps the subject line could say "completion: offer '--edit-todo'
during interactive rebase" to be a bit more specific.
{
local dir="$(__gitdir)"
if [ -d "$dir"/rebase-apply ] || [ -d "$dir"/rebase-merge ]; then
- __gitcomp "--continue --skip --abort"
+ if [ -d "$dir"/interactive ]; then
This doesn't work for me, I think it looks for the right file at the
wrong place. During an interactive rebase I have no
'.git/interactive' file but a '.git/rebase-merge/interactive', so I
never get '--edit-todo'.
After some playing around and a cursory look at the source it seems to
me that I have '.git/rebase-apply' during a "regular" rebase and
'.git/rebase-merge' during an interactive rebase, and git-rebase.sh
checks the presence of the 'interactive' file only in
'.git/rebase-merge'. It's not clear to me yet whether it's possible
to have a '.git/rebase-merge' without the file 'interactive' in it.
If it is possible, then I'd like to know with which commands and under
what circumstances. If it isn't, then we wouldn't have to look for
the file at all, because checking the presence of the directory would
be enough.
"git rebase --merge" will use ".git/rebase-merge" without creating the
"interactive" flag.
From: SZEDER Gábor <hidden> Date: 2016-06-15 23:06:02
Quoting John Keeping [off-list ref]:
On Thu, Jul 30, 2015 at 01:24:03PM +0200, SZEDER Gábor wrote:
quoted
Quoting Thomas Braun [off-list ref]:
quoted
Signed-off-by: Thomas Braun <redacted>
---
quoted
John Keeping [off-list ref] hat am 13. Juli 2015 um 15:11
geschrieben:
quoted
quoted
git-rebase.sh contains:
if test "$action" = "edit-todo" && test "$type" != "interactive"
then
die "$(gettext "The --edit-todo action can only be used during
interactive
quoted
quoted
rebase.")"
fi
I wonder if it's worth doing a similar check here, which presumably
means testing if "$dir"/interactive exists.
Good point. Thanks for the hint.
Perhaps the subject line could say "completion: offer '--edit-todo'
during interactive rebase" to be a bit more specific.
{
local dir="$(__gitdir)"
if [ -d "$dir"/rebase-apply ] || [ -d "$dir"/rebase-merge ]; then
- __gitcomp "--continue --skip --abort"
+ if [ -d "$dir"/interactive ]; then
This doesn't work for me, I think it looks for the right file at the
wrong place. During an interactive rebase I have no
'.git/interactive' file but a '.git/rebase-merge/interactive', so I
never get '--edit-todo'.
Just noticed another issue here: it looks for a directory, though it
should look for a file.
quoted
After some playing around and a cursory look at the source it seems to
me that I have '.git/rebase-apply' during a "regular" rebase and
'.git/rebase-merge' during an interactive rebase, and git-rebase.sh
checks the presence of the 'interactive' file only in
'.git/rebase-merge'. It's not clear to me yet whether it's possible
to have a '.git/rebase-merge' without the file 'interactive' in it.
If it is possible, then I'd like to know with which commands and under
what circumstances. If it isn't, then we wouldn't have to look for
the file at all, because checking the presence of the directory would
be enough.
"git rebase --merge" will use ".git/rebase-merge" without creating the
"interactive" flag.
Oh, right, thanks. I should have remembered, I wrote the test of the
prompt script for that case...
(On a related note: is it possible to have a '.git/rebase-apply'
directory, but neither 'rebasing' or 'applying' files within? The
prompt script has a long if-elif chain with such a branch, and I
remember wondering how I could trigger it for testing.)
Anyway, so this could be something like (modulo likely whitespace damage):
From: Thomas Braun <hidden> Date: 2016-06-15 23:06:02
Am 31.07.2015 um 12:16 schrieb SZEDER Gábor:
quoted hunk
Quoting John Keeping [off-list ref]:
quoted
On Thu, Jul 30, 2015 at 01:24:03PM +0200, SZEDER Gábor wrote:
quoted
Quoting Thomas Braun [off-list ref]:
quoted
Signed-off-by: Thomas Braun <redacted>
---
quoted
John Keeping [off-list ref] hat am 13. Juli 2015 um 15:11
geschrieben:
quoted
quoted
git-rebase.sh contains:
if test "$action" = "edit-todo" && test "$type" != "interactive"
then
die "$(gettext "The --edit-todo action can only be used during
interactive
quoted
quoted
rebase.")"
fi
I wonder if it's worth doing a similar check here, which presumably
means testing if "$dir"/interactive exists.
Good point. Thanks for the hint.
Perhaps the subject line could say "completion: offer '--edit-todo'
during interactive rebase" to be a bit more specific.
{
local dir="$(__gitdir)"
if [ -d "$dir"/rebase-apply ] || [ -d "$dir"/rebase-merge ]; then
- __gitcomp "--continue --skip --abort"
+ if [ -d "$dir"/interactive ]; then
This doesn't work for me, I think it looks for the right file at the
wrong place. During an interactive rebase I have no
'.git/interactive' file but a '.git/rebase-merge/interactive', so I
never get '--edit-todo'.
Just noticed another issue here: it looks for a directory, though it
should look for a file.
quoted
quoted
After some playing around and a cursory look at the source it seems to
me that I have '.git/rebase-apply' during a "regular" rebase and
'.git/rebase-merge' during an interactive rebase, and git-rebase.sh
checks the presence of the 'interactive' file only in
'.git/rebase-merge'. It's not clear to me yet whether it's possible
to have a '.git/rebase-merge' without the file 'interactive' in it.
If it is possible, then I'd like to know with which commands and under
what circumstances. If it isn't, then we wouldn't have to look for
the file at all, because checking the presence of the directory would
be enough.
"git rebase --merge" will use ".git/rebase-merge" without creating the
"interactive" flag.
Oh, right, thanks. I should have remembered, I wrote the test of the
prompt script for that case...
(On a related note: is it possible to have a '.git/rebase-apply'
directory, but neither 'rebasing' or 'applying' files within? The
prompt script has a long if-elif chain with such a branch, and I
remember wondering how I could trigger it for testing.)
Anyway, so this could be something like (modulo likely whitespace damage):
This looks much better than my attempt. Thanks.
How is the protocol now? Do I reroll and add
Helped-By: John Keeping [off-list ref]
Completely-Overhauled-And-Properly-Implemented: SZEDER Gábor [off-list ref]
?
Thomas
This looks much better than my attempt. Thanks.
How is the protocol now? Do I reroll and add
Helped-By: John Keeping [off-list ref]
Completely-Overhauled-And-Properly-Implemented: SZEDER Gábor
[off-list ref]
Ugh :) I'm quite happy with Helped-by, if you do a proper reroll
after trying it out to see that it indeed does what it should.
Thanks,
Gábor
From: Thomas Braun <hidden> Date: 2016-06-15 23:06:05
Signed-off-by: Thomas Braun <redacted>
Helped-by: John Keeping [off-list ref]
Helped-by: SZEDER Gábor [off-list ref]
---
Tested by:
- ensuring I'm in a bash shell
- source git-completion.bash
- git rebase -i HEAD~1, choose edit instead of pick in the editor
- on entering "git rebase" you should be offered "--edit-todo"
contrib/completion/git-completion.bash | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)