[PATCH] dim: do not run hooks when rebuilding tip

Daniel Vetter daniel at ffwll.ch
Fri Jan 25 15:32:09 UTC 2019


On Fri, Jan 25, 2019 at 2:32 PM Jani Nikula <jani.nikula at linux.intel.com> wrote:
>
> On Fri, 25 Jan 2019, Daniel Vetter <daniel at ffwll.ch> wrote:
> > On Fri, Jan 25, 2019 at 02:27:17AM -0800, Lucas De Marchi wrote:
> >> dim rebuild-tip was failing for me and after investigation with Daniel
> >> Vetter, the culprit was having a pre-commit git hook enabled. Let's pass
> >> --no-verify to avoid the same mistake for other people.
> >>
> >> Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
> >
> > Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>
>
> Hmm, so how about other places where we run git commit? How about pretty
> much every hook git supports and every place where we run git commands
> that are affected by hooks?
>
> i.e. where do we draw the line for users shooting themselves in the
> foot?

Fundamental problem of running our scripts client side, we're not in
control of the environment. Another example is all the fun we've had
around rr-cache mismatches, between different git versions, different
branch names, different merge conflict styles. We just hack around
those issues as they come up.

Wrt git commit, I think all the commits we do as part of dim apply*
are ok if they use the same set of hooks the developer is used to. dim
rebuild-tip otoh is a bit a different thing, there we need everyone to
have the same setup, or there's going to be random failures. Yes it's
not great, but I don't really have a better idea here than to keep
improvising as we go :-/
-Daniel

>
>
> BR,
> Jani.
>
>
> >
> >> ---
> >>  dim | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/dim b/dim
> >> index 00ac1b1340fd..8e1bfa968e4a 100755
> >> --- a/dim
> >> +++ b/dim
> >> @@ -772,7 +772,7 @@ function dim_rebuild_tip
> >>
> >>                      # because we filter out fast-forward merges there will
> >>                      # always be something to commit
> >> -                    git commit --no-edit --quiet
> >> +                    git commit --no-edit --quiet --no-verify
> >>                      echo "Done."
> >>              fi
> >>
> >> --
> >> 2.20.0
> >>
>
> --
> Jani Nikula, Intel Open Source Graphics Center



-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch


More information about the dim-tools mailing list