git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Merge commit says refs/heads/<branchname> instead of <branchname>
@ 2019-11-12 23:48 Mateusz Loskot
  2019-11-13  5:15 ` Jeff King
  0 siblings, 1 reply; 5+ messages in thread
From: Mateusz Loskot @ 2019-11-12 23:48 UTC (permalink / raw)
  To: git

Hi,

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'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?

Best regards
-- 
Mateusz Loskot, http://mateusz.loskot.net

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

* Re: Merge commit says refs/heads/<branchname> instead of <branchname>
  2019-11-12 23:48 Merge commit says refs/heads/<branchname> instead of <branchname> Mateusz Loskot
@ 2019-11-13  5:15 ` Jeff King
  2019-11-13  7:12   ` Junio C Hamano
  0 siblings, 1 reply; 5+ messages in thread
From: Jeff King @ 2019-11-13  5:15 UTC (permalink / raw)
  To: Mateusz Loskot; +Cc: git

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

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

* Re: Merge commit says refs/heads/<branchname> instead of <branchname>
  2019-11-13  5:15 ` Jeff King
@ 2019-11-13  7:12   ` Junio C Hamano
  2019-11-15 21:54     ` Mateusz Loskot
  0 siblings, 1 reply; 5+ messages in thread
From: Junio C Hamano @ 2019-11-13  7:12 UTC (permalink / raw)
  To: Jeff King; +Cc: Mateusz Loskot, git

Jeff King <peff@peff.net> writes:

> 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?

Yes, I am curious, too.

>> 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).

If older versions of git produced "Merge branch 'side'" when told to
merge 'refs/heads/side', I could sort-of believe it.  And if we no
longer do so and instead record "Merge branch 'refs/heads/side'",
then I actually think that is a desirable change.

By the way, pulling from self follows slightly different rule, i.e.

	$ git pull . refs/heads/side

would likely give you "Merge branch 'side'".




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

* Re: Merge commit says refs/heads/<branchname> instead of <branchname>
  2019-11-13  7:12   ` Junio C Hamano
@ 2019-11-15 21:54     ` Mateusz Loskot
  2019-11-29  8:06       ` Mateusz Loskot
  0 siblings, 1 reply; 5+ messages in thread
From: Mateusz Loskot @ 2019-11-15 21:54 UTC (permalink / raw)
  To: git

On Wed, 13 Nov 2019 at 08:12, Junio C Hamano <gitster@pobox.com> wrote:
> Jeff King <peff@peff.net> writes:
>
> > 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?
>
> Yes, I am curious, too.

Jeff, Junio,

Thank you very much for your responses and confirmations
of expected behaviours.

I will try to confirm with my colleagues what's changed,
what are actual commands and Git versions in use.
I'll be back here if I discover anything suspicious.

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net

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

* Re: Merge commit says refs/heads/<branchname> instead of <branchname>
  2019-11-15 21:54     ` Mateusz Loskot
@ 2019-11-29  8:06       ` Mateusz Loskot
  0 siblings, 0 replies; 5+ messages in thread
From: Mateusz Loskot @ 2019-11-29  8:06 UTC (permalink / raw)
  To: git

On Fri, 15 Nov 2019 at 22:54, Mateusz Loskot <mateusz@loskot.net> wrote:
> On Wed, 13 Nov 2019 at 08:12, Junio C Hamano <gitster@pobox.com> wrote:
> > Jeff King <peff@peff.net> writes:
> >
> > > 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?
> >
> > Yes, I am curious, too.
>
> Jeff, Junio,
>
> Thank you very much for your responses and confirmations
> of expected behaviours.
>
> I will try to confirm with my colleagues what's changed,
> what are actual commands and Git versions in use.
> I'll be back here if I discover anything suspicious.

Apparently, the workflow involved Git client Fork and one of recent
updates of the client introduced the change in the behaviour:

I reported the issue
https://github.com/ForkIssues/TrackerWin/issues/570
and the bug has been confirmed
"we replaced git merge branch with git merge /refs/heads/branch"

Jeff, Junio, thanks for help.

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net

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

end of thread, other threads:[~2019-11-29  8:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-12 23:48 Merge commit says refs/heads/<branchname> instead of <branchname> Mateusz Loskot
2019-11-13  5:15 ` Jeff King
2019-11-13  7:12   ` Junio C Hamano
2019-11-15 21:54     ` Mateusz Loskot
2019-11-29  8:06       ` Mateusz Loskot

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).