From: "Michał Mirosław" <emmir@google.com>
To: git@vger.kernel.org
Subject: includeIf not matching during `git rebase`
Date: Tue, 25 Jul 2023 21:49:15 +0200 [thread overview]
Message-ID: <CABb0KFF1vqMLa5DLYd_c9sQeZbhkhQ=Q0bE7W41nmMFmNWB4tg@mail.gmail.com> (raw)
* 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
next reply other threads:[~2023-07-25 19:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-25 19:49 Michał Mirosław [this message]
2023-07-25 20:28 ` includeIf not matching during `git rebase` Emily Shaffer
2023-07-25 23:15 ` Junio C Hamano
2023-07-27 18:08 ` Glen Choo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CABb0KFF1vqMLa5DLYd_c9sQeZbhkhQ=Q0bE7W41nmMFmNWB4tg@mail.gmail.com' \
--to=emmir@google.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).