On Fri, 15 Nov 2019, Lucas De Marchi <[email protected]> wrote: > Add method add-link-head that applies the link to head without any > additional check. This is useful either to reduce typing or to add a > link while in the middle of an interactive rebase.
I see the patch does what it says on the box. However: 1) Most commands expect you to supply the branch name so you know what you're doing. There's tab completion to aid you, but you need to see what branch you're operating on. This has been in place since there was only one gun and two feet; now there are quite a few more people with opportunities to shoot themselves in the foot. 2) I think we should discourage pushing locally rebased patches. Recommend only pushing patches that apply cleanly. I'd go as far as removing the add-link* subcommands altogether. BR, Jani. > > Signed-off-by: Lucas De Marchi <[email protected]> > --- > dim | 23 +++++++++++++++-------- > 1 file changed, 15 insertions(+), 8 deletions(-) > > diff --git a/dim b/dim > index 1c2da80..3aad25f 100755 > --- a/dim > +++ b/dim > @@ -1255,17 +1255,11 @@ function dim_rebase > fi > } > > -function dim_add_link > +function dim_add_link_head > { > - local branch file message_id > + local file message_id > > - branch=${1:?$usage} > - shift > file=$(mktemp) > - > - assert_branch $branch > - assert_repo_clean > - > cat > $file > > message_id=$(message_get_id $file) > @@ -1279,6 +1273,19 @@ function dim_add_link > fi > } > > +function dim_add_link > +{ > + local branch file message_id > + > + branch=${1:?$usage} > + shift > + > + assert_branch $branch > + assert_repo_clean > + > + dim_add_link_head > +} > + > function dim_add_link_queued > { > dim_add_link drm-intel-next-queued "$@" -- Jani Nikula, Intel Open Source Graphics Center _______________________________________________ dim-tools mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dim-tools
