Re: Setting change-id when doing git merge

78 views
Skip to first unread message

Matthias Sohn

unread,
Feb 15, 2023, 2:20:22 AM2/15/23
to William, Repo and Gerrit Discussion
On Wed, Feb 15, 2023 at 1:55 AM William <bacha....@gmail.com> wrote:
Hi

I am using git merge to  merge changes from one branch to another ,I notice the change-id is not preserved  when doing this? I notice change-id is preserved when doing a cherry-pick, is there a way to set the change-d explicitly even when doing a git merge?

git merge --no-ff <commit id>

I don't understand which change-id you want to preserve in case of a merge 
which brings in all the changes from the branch you are merging.

-Matthias 

Sven Selberg

unread,
Feb 16, 2023, 2:33:40 AM2/16/23
to Repo and Gerrit Discussion
If you mean that a Change-Id isn't created for the merge commit, then IIRC that is because the git version you are using doesn't trigger the .git/hooks/commit-msg hook on merges.
Should be solved by upgrading git.
 

-Matthias 
Reply all
Reply to author
Forward
0 new messages