dim: Remove git commit --amend from dim_apply
PATCH 1/1 dim: Remove git commit --amend from dim_apply
Calling git --amend invokes the editor, which will not run if it relies on the terminal for input. So don't do that from dim_apply.
--- dim | 2 -- 1 file changed, 2 deletions(-)
dim +0 -2
@@ -382,8 +382,6 @@ function dim_apply if [ -n $message_id ]; then commit_add_tag "Link" "http://patchwork.freedesktop.org/patch/msgid/$message_id" fi - - git commit --amend & } function magic_patch
Signature · 6 lines
2.4.3 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 4 lines · Ander Conselvan de Oliveira
Calling git --amend invokes the editor, which will not run if it relies on the terminal for input. So don't do that from
dim_apply.Signed-off-by Ander Conselvan de Oliveira <[email protected]>
Presumable the ammend is there for a good reason and removing it keeps the state dirty? So maybe --amend --no-edit?
-Chris
Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 8 lines · Chris Wilson
Quoted 4 lines · Ander Conselvan de Oliveira
Calling git --amend invokes the editor, which will not run if it relies on the terminal for input. So don't do that from
dim_apply.Signed-off-by Ander Conselvan de Oliveira <[email protected]>Presumable the ammend is there for a good reason and removing it keeps the state dirty? So maybe --amend --no-edit?
In either case can also consider "test -t 0" which is like isatty(0).
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 5 lines · Tvrtko Ursulin
Quoted 4 lines · Chris Wilson
Quoted 3 lines · Ander Conselvan de Oliveira
Calling git --amend invokes the editor, which will not run if it relies on the terminal for input. So don't do that from
dim_apply.
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
Signed-off-by: Ander Conselvan de Oliveira <
[email protected]>Presumable the ammend is there for a good reason and removing it keeps the state dirty? So maybe --amend --no-edit?
In either case can also consider "test -t 0" which is like isatty(0).
I think that will always evaluate to false since you are supposed to cat the mbox to dim apply.
Ander
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 9 lines · Ander Conselvan De Oliveira
Quoted 8 lines · Tvrtko Ursulin
Quoted 7 lines · Chris Wilson
Quoted 5 lines · Ander Conselvan de Oliveira
Calling git --amend invokes the editor, which will not run if it relies on the terminal for input. So don't do that from
dim_apply.Signed-off-by: Ander Conselvan de Oliveira <
[email protected]>
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Presumable the ammend is there for a good reason and removing it keeps the state dirty? So maybe --amend --no-edit?
In either case can also consider "test -t 0" which is like isatty(0).
I think that will always evaluate to false since you are supposed to cat the mbox to dim apply.
Question is then how does it work for Daniel. :)
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 15 lines · Tvrtko Ursulin
Quoted 14 lines · Ander Conselvan De Oliveira
Quoted 13 lines · Tvrtko Ursulin
Quoted 11 lines · Chris Wilson
Quoted 6 lines · Ander Conselvan de Oliveira
Calling git --amend invokes the editor, which will not run if it relies
on the terminal for input. So don't do that fromdim_apply.Signed-off-by: Ander Conselvan de Oliveira <
[email protected]>Presumable the ammend is there for a good reason and removing it keeps the state dirty? So maybe --amend --no-edit?
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
In either case can also consider "test -t 0" which is like isatty(0).
I think that will always evaluate to false since you are supposed to cat the mbox to dim apply.
Question is then how does it work for Daniel. :)
If I understood correctly he uses gvim, which doesn't run on a terminal.
Ander
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 16 lines · Ander Conselvan De Oliveira
Quoted 15 lines · Tvrtko Ursulin
Quoted 14 lines · Ander Conselvan De Oliveira
Quoted 13 lines · Tvrtko Ursulin
Quoted 11 lines · Chris Wilson
Quoted 6 lines · Ander Conselvan de Oliveira
Calling git --amend invokes the editor, which will not run if it relies
on the terminal for input. So don't do that fromdim_apply.Signed-off-by: Ander Conselvan de Oliveira <
[email protected]>Presumable the ammend is there for a good reason and removing it keeps the state dirty? So maybe --amend --no-edit?
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
In either case can also consider "test -t 0" which is like isatty(0).
I think that will always evaluate to false since you are supposed to cat the mbox to dim apply.
Question is then how does it work for Daniel. :)
If I understood correctly he uses gvim, which doesn't run on a terminal.
Yup. And I use git commit --amend to paste in all the r-b/t-b tags and all that stuff. Maybe we need a DIM_POST_APPLY_CMD in .dimrc? -Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 9 lines · Chris Wilson
Quoted 5 lines · Ander Conselvan de Oliveira
Calling git --amend invokes the editor, which will not run if it relies on the terminal for input. So don't do that from
dim_apply.Signed-off-by: Ander Conselvan de Oliveira <
[email protected]>Presumable the ammend is there for a good reason and removing it keeps the state dirty? So maybe --amend --no-edit?
I'm fine with that, but I'd like to have a definitive answer to the question before I resend. Maybe Daniel knows?
Ander
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 8 lines · Chris Wilson
Quoted 4 lines · Ander Conselvan de Oliveira
Calling git --amend invokes the editor, which will not run if it relies on the terminal for input. So don't do that from
dim_apply.Signed-off-by Ander Conselvan de Oliveira <[email protected]>Presumable the ammend is there for a good reason and removing it keeps the state dirty? So maybe --amend --no-edit?
I don't think there's any reason other than Daniel's gvim workflow.
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 11 lines · Ville Syrjälä
Quoted 8 lines · Chris Wilson
Quoted 4 lines · Ander Conselvan de Oliveira
Calling git --amend invokes the editor, which will not run if it relies on the terminal for input. So don't do that from
dim_apply.Signed-off-by Ander Conselvan de Oliveira <[email protected]>Presumable the ammend is there for a good reason and removing it keeps the state dirty? So maybe --amend --no-edit?
I don't think there's any reason other than Daniel's gvim workflow.
Yes, that's it, there's no functional reason other than to fire up an editor to edit the commit message (add r-b, etc.) This always fails for me and I just do this in the cli separately.
Basically three options, just remove it, add tty test suggested by Tvrtko, or add some DIM_POST_APPLY_ACTION configuration. I'm fine with any of them.
BR,
Jani.
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 13 lines · Jani Nikula
Quoted 11 lines · Ville Syrjälä
Quoted 8 lines · Chris Wilson
Quoted 4 lines · Ander Conselvan de Oliveira
Calling git --amend invokes the editor, which will not run if it relies on the terminal for input. So don't do that from
dim_apply.Signed-off-by Ander Conselvan de Oliveira <[email protected]>Presumable the ammend is there for a good reason and removing it keeps the state dirty? So maybe --amend --no-edit?
I don't think there's any reason other than Daniel's gvim workflow.
Quoted 7 lines
Yes, that's it, there's no functional reason other than to fire up an editor to edit the commit message (add r-b, etc.) This always fails for me and I just do this in the cli separately.
Basically three options, just remove it, add tty test suggested by Tvrtko, or add some
DIM_POST_APPLY_ACTIONconfiguration. I'm fine with any of them.
I don't want to amend the commit at this point in my workflow. "dim xt" (should upstream that somehow one of these days...) is what I do after "dim aq", so anything that fires up an editor is no good for me.
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/1 dim: Replace git commit --amend from dim_apply with dimrc option
In reply to Jani NikulaIntroduce DIM_POST_APPLY_ACTION to dimrc that allows the user to specify a command to be run after a patch is applied. Use eval so enviroment variables can be overriden with the option. For example:
DIM_POST_APPLY_ACTION="EDITOR=\"gedit -w\" git commit --amend"
--- dim | 2 +- dimrc.sample | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-)
dim +1 -1
@@ -383,7 +383,7 @@ function dim_apply commit_add_tag "Link" "http://patchwork.freedesktop.org/patch/msgid/$message_id" fi - git commit --amend & + eval $DRY $DIM_POST_APPLY_ACTION } function magic_patch
dimrc.sample +3 -0
@@ -21,3 +21,6 @@ # Mail User Agent supporting a subset of mutt(1) command line options: # [-s subject] [-i file] [-c cc-addr] to-addr [...] #DIM_MUA=mutt + +# Command to run after dim apply +#DIM_POST_APPLY_ACTION=git commit --amend
Signature · 6 lines
2.4.3 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH maintainer-tools] dim: Replace git commit --amend from dim_apply with dimrc option
Hi Ander,
Quoted 5 lines · Ander Conselvan de Oliveira
Introduce
DIM_POST_APPLY_ACTIONto dimrc that allows the user to specify a command to be run after a patch is applied. Use eval so enviroment variables can be overriden with the option. For example:DIM_POST_APPLY_ACTION="EDITOR=\"gedit -w\" git commit --amend"
So an attacker wishing to smuggle a backdoor into the Linux kernel only needs to find a way to modify that environment variable on an Intel developers' machine.
If dim is invoked with $EDITOR set, this should be inherited to child processes anyway, so it seems unnecessary to call eval.
Just my 2 cents,
Lukas
Quoted 38 lines
Signed-off-by Ander Conselvan de Oliveira <[email protected]>--- dim | 2 +- dimrc.sample | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-)dim +1
-1@@ -383,7 +383,7 @@ function dim_apply commit_add_tag "Link" "http://patchwork.freedesktop.org/patch/msgid/$message_id" fi - git commit --amend & + eval $DRY $DIM_POST_APPLY_ACTION } function magic_patchdimrc.sample +3
-0@@ -21,3 +21,6 @@ # Mail User Agent supporting a subset of mutt(1) command line options: # [-s subject] [-i file] [-c cc-addr] to-addr [...] #DIM_MUA=mutt + +# Command to run after dim apply +#DIM_POST_APPLY_ACTION=git commit --amendSignature · 6 lines
2.4.3 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH maintainer-tools] dim: Replace git commit --amend from dim_apply with dimrc option
In reply to Ander Conselvan de OliveiraQuoted 30 lines · Ander Conselvan de Oliveira
Introduce
DIM_POST_APPLY_ACTIONto dimrc that allows the user to specify a command to be run after a patch is applied. Use eval so enviroment variables can be overriden with the option. For example:DIM_POST_APPLY_ACTION="EDITOR=\"gedit -w\" git commit --amend"
Signed-off-by Ander Conselvan de Oliveira <[email protected]>--- dim | 2 +- dimrc.sample | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-)dim +1
-1@@ -383,7 +383,7 @@ function dim_apply commit_add_tag "Link" "http://patchwork.freedesktop.org/patch/msgid/$message_id" fi - git commit --amend & + eval $DRY $DIM_POST_APPLY_ACTION } function magic_patchdimrc.sample +0
-0
dimrc.sample line 26
Quoted 6 lines
dimrc.sample +3
-0@@ -21,3 +21,6 @@ # Mail User Agent supporting a subset of mutt(1) command line options: # [-s subject] [-i file] [-c cc-addr] to-addr [...] #DIM_MUA=mutt + +# Command to run after dim apply +#DIM_POST_APPLY_ACTION=git commit --amend
There's a comment earlier that says "Defaults are in the comments below." I'm fine with changing the default here.
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v2 1/1 dim: Replace git commit --amend from dim_apply with dimrc option
Introduce DIM_POST_APPLY_ACTION to dimrc that allows the user to specify a command to be run after a patch is applied. Use eval so enviroment variables can be overriden with the option. For example:
DIM_POST_APPLY_ACTION="EDITOR=\"gedit -w\" git commit --amend"
v2: Initialize variable with default value.
Fix dimrc.sample to match default value.
--- dim | 5 ++++- dimrc.sample | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-)
dim +4 -1
@@ -65,6 +65,9 @@ DIM_DRM_UPSTREAM_REMOTE=${DIM_DRM_UPSTREAM_REMOTE:-airlied} # usage: $DIM_MUA [-s subject] [-i file] [-c cc-addr] to-addr [...] DIM_MUA=${DIM_MUA:-mutt} +# command to run after dim apply +DIM_POST_APPLY_ACTION=${DIM_POST_APPLY_ACTION:-} + # greetings pull request template DIM_TEMPLATE_HELLO=${DIM_TEMPLATE_HELLO:-$HOME/.dim.template.hello}
@@ -383,7 +386,7 @@ function dim_apply commit_add_tag "Link" "http://patchwork.freedesktop.org/patch/msgid/$message_id" fi - git commit --amend & + eval $DRY $DIM_POST_APPLY_ACTION } function magic_patch
dimrc.sample +3 -0
@@ -21,3 +21,6 @@ # Mail User Agent supporting a subset of mutt(1) command line options: # [-s subject] [-i file] [-c cc-addr] to-addr [...] #DIM_MUA=mutt + +# Command to run after dim apply +#DIM_POST_APPLY_ACTION=
Signature · 6 lines
2.4.3 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH v2 maintainer-tools] dim: Replace git commit --amend from dim_apply with dimrc option
Quoted 10 lines · Ander Conselvan de Oliveira
Introduce
DIM_POST_APPLY_ACTIONto dimrc that allows the user to specify a command to be run after a patch is applied. Use eval so enviroment variables can be overriden with the option. For example:DIM_POST_APPLY_ACTION="EDITOR=\"gedit -w\" git commit --amend"
v2: Initialize variable with default value.
Fix dimrc.sample to match default value.Signed-off-by Ander Conselvan de Oliveira <[email protected]>
Quoted 46 lines
--- dim | 5 ++++- dimrc.sample | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-)dim +4
-1@@ -65,6 +65,9 @@ DIM_DRM_UPSTREAM_REMOTE=${DIM_DRM_UPSTREAM_REMOTE:-airlied} # usage: $DIM_MUA [-s subject] [-i file] [-c cc-addr] to-addr [...] DIM_MUA=${DIM_MUA:-mutt} +# command to run after dim apply +DIM_POST_APPLY_ACTION=${DIM_POST_APPLY_ACTION:-} + # greetings pull request template DIM_TEMPLATE_HELLO=${DIM_TEMPLATE_HELLO:-$HOME/.dim.template.hello}@@ -383,7 +386,7 @@ function dim_apply commit_add_tag "Link" "http://patchwork.freedesktop.org/patch/msgid/$message_id" fi - git commit --amend & + eval $DRY $DIM_POST_APPLY_ACTION } function magic_patchdimrc.sample +3
-0@@ -21,3 +21,6 @@ # Mail User Agent supporting a subset of mutt(1) command line options: # [-s subject] [-i file] [-c cc-addr] to-addr [...] #DIM_MUA=mutt + +# Command to run after dim apply +#DIM_POST_APPLY_ACTION=Signature · 6 lines
2.4.3 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH v2 maintainer-tools] dim: Replace git commit --amend from dim_apply with dimrc option
Quoted 7 lines · Daniel Vetter
Quoted 6 lines · Ander Conselvan de Oliveira
Introduce
DIM_POST_APPLY_ACTIONto dimrc that allows the user to specify a command to be run after a patch is applied. Use eval so enviroment variables can be overriden with the option. For example:DIM_POST_APPLY_ACTION="EDITOR=\"gedit -w\" git commit --amend"
Quoted 7 lines
Quoted 5 lines
v2: Initialize variable with default value.
Fix dimrc.sample to match default value.Signed-off-by: Ander Conselvan de Oliveira <
[email protected]>Reviewed-by Daniel Vetter <[email protected]>
Thanks. Patch pushed.
Ander
Quoted 45 lines
Quoted 45 lines
--- dim | 5 ++++- dimrc.sample | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-)dim +3
-1@@ -65,6 +65,9 @@ DIM_DRM_UPSTREAM_REMOTE=${DIM_DRM_UPSTREAM_REMOTE: -airlied} # usage: $DIM_MUA [-s subject] [-i file] [-c cc-addr] to-addr [...] DIM_MUA=${DIM_MUA:-mutt} +# command to run after dim apply +DIM_POST_APPLY_ACTION=${DIM_POST_APPLY_ACTION:-} + # greetings pull request template DIM_TEMPLATE_HELLO=${DIM_TEMPLATE_HELLO:-$HOME/.dim.template.hello}@@ -383,7 +386,7 @@ function dim_apply commit_add_tag "Link" "http://patchwork.freedesktop.org/patch/msgid/$message_id"
dim +1
-1fi - git commit --amend & + eval $DRY $DIM_POST_APPLY_ACTION } function magic_patchdimrc.sample +3
-0@@ -21,3 +21,6 @@ # Mail User Agent supporting a subset of mutt(1) command line options: # [-s subject] [-i file] [-c cc-addr] to-addr [...] #DIM_MUA=mutt + +# Command to run after dim apply +#DIM_POST_APPLY_ACTION=Signature · 1 line
2.4.3
Quoted 5 lines
Quoted 4 lines
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: failure for dim: Remove git commit --amend from dim_apply
In reply to Ander Conselvan de Oliveira== Series Details ==
== Series Details ==
Series: dim: Remove git commit --amend from dim_apply
URL : https://patchwork.freedesktop.org/series/738/
State : failure
== Summary ==
Patch is empty.
When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort".
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx