Git development
 help / color / mirror / Atom feed
* How to execute a command on git am/rebase/cherry pick --abort ?
@ 2024-01-18 12:53 Konstantin Kharlamov
  2024-01-18 13:29 ` Patrick Steinhardt
  0 siblings, 1 reply; 5+ messages in thread
From: Konstantin Kharlamov @ 2024-01-18 12:53 UTC (permalink / raw)
  To: git

(please keep me CC'ed, I'm not subscribed)

Hello!

There's a well-known problem of git not fully checking out changes
while doing e.g. `git checkout` and similar commands when you have
submodules. So e.g. if HEAD changes a submodule commit and you do an
interactive rebase to HEAD~2, you may be lucky to find a submodule
commit change in `git diff` (because if you don't get lucky, you won't
notice that and commit the change to the unrelated HEAD~2).

As a workaround I have a `git submodule update` inside `post-checkout`
hook.

Now, the problem is I still often finding myself having the wrong
submodule ID, and I tracked down that problem to commands such as
`am/rebase/cherry-pick --abort` also not updating the submodule, nor
executing `post-checkout`.

I looked through `man githooks` but couldn't find any way to execute a
`git submodule update` during these aborts.

Any ideas how to fix these?

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-01-29 14:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-18 12:53 How to execute a command on git am/rebase/cherry pick --abort ? Konstantin Kharlamov
2024-01-18 13:29 ` Patrick Steinhardt
2024-01-18 13:30   ` Konstantin Kharlamov
2024-01-29 14:35   ` Konstantin Kharlamov
2024-01-29 14:40     ` Konstantin Kharlamov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox