Re: Merge commit says refs/heads/<branchname> instead of <branchname>

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 13, 2019 at 12:48:53AM +0100, Mateusz Loskot wrote:

> After setting up a new machine with latest Git and
> I noticed commit messages for true merge changed from
> 
>    Merge branch '<branchname>'
> to
>    Merge branch 'refs/heads/<branchname>'
> 
> Nothing changed in the merge workflow or git configuration

I can't reproduce the problem here. If I set up a repository like this:

  git init repo && cd repo
  >base && git add base && git commit -m base
  >master && git add master && git commit -m master
  git checkout -b side HEAD^
  >side && git add side && git commit -m side
  git checkout master
  git tag tip

and then run:

  git reset --hard tip && git merge --no-edit side
  git log -1 --oneline

I get:

  Merge branch 'side'

If I do:

  git reset --hard tip && git merge --no-edit refs/heads/side
  git log -1 --oneline

then I get:

  Merge branch 'refs/heads/side'

And the behavior seems the same going back to older versions of Git. Are
you sure your workflow hasn't changed somehow?

Can you show an example that triggers the behavior for you?

> I'm failing to find in the docs what drives that change, what
> configuration option controls such (default?) message.
> 
> What may be the reason of that change?

I think any change there would probably be unintentional (but it's hard
to say for sure without tracking it down).

-Peff



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux