git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* includeIf not matching during `git rebase`
@ 2023-07-25 19:49 Michał Mirosław
  2023-07-25 20:28 ` Emily Shaffer
  0 siblings, 1 reply; 4+ messages in thread
From: Michał Mirosław @ 2023-07-25 19:49 UTC (permalink / raw)
  To: git

* What did you do before the bug happened? (Steps to reproduce your issue)

With ~/.gitconfig having:

[includeIf "onbranch:pr/"]
        path = .gitconfig.for-upstream

where the included config changes commit-msg hook,

git checkout pr/zzz # has multiple commits over upstream
git rebase -i
> 'edit' first commit
(modify it)
git rebase --continue

* What did you expect to happen? (Expected behavior)

The commit messages are unchanged.

* What happened instead? (Actual behavior)

The rebased commits had messages modified by default commit-msg hook.

* What's different between what you expected and what actually happened?

I'd expect includeIf to match and in effect prevent the default commit
message modifications.

[System Info]
git version:
git version 2.41.0.487.g6d72f3e995-goog
cpu: x86_64
no commit associated with this build
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
compiler info: gnuc: 12.2
libc info: glibc: 2.36
$SHELL (typically, interactive shell): /bin/bash


[Enabled Hooks]
commit-msg
pre-commit
prepare-commit-msg

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

end of thread, other threads:[~2023-07-27 18:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-25 19:49 includeIf not matching during `git rebase` Michał Mirosław
2023-07-25 20:28 ` Emily Shaffer
2023-07-25 23:15   ` Junio C Hamano
2023-07-27 18:08     ` Glen Choo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).