diff --git a/lefthook.yml b/lefthook.yml index 28178432c31..40875073fdd 100644 --- a/lefthook.yml +++ b/lefthook.yml @@ -15,4 +15,6 @@ post-merge: post-checkout: commands: update-submodules: - run: git submodule update --init --recursive \ No newline at end of file + # cf https://git-scm.com/docs/githooks#_post_checkout: + # The 3rd argument is 1 for branch checkouts and 0 for file checkouts. + run: if test {3} -eq "1"; then git submodule update --init --recursive; fi \ No newline at end of file