Re: [PATCH] docs: rebasing-and-merging: Drop wrong statement about git

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

 



On Tue, Feb 28, 2023 at 12:14:41PM -0700, Jonathan Corbet wrote:
> So the patch is worth applying, but I may tweak the changelog some.

I spotted a414684e3b735a4114c19295a07e8cb2eb889dae in next now. You made
the changelog read:

	The "^0" syntax is no longer needed to fast-forward to a mainline commit

I'm willing to bet that ^0 was never needed to force a fast-forward and
using it was never had an advantage. The semantic of $rev^0 is and
always was: The commit related to $rev. If $rev is a commit, then $rev^0
is the same as $rev. If $rev is a tag, then $rev^0 is the tagged commit.

See:

	$ git rev-parse v5.2-rc1
	311e1ea1b63dc428575270b9d4801e3e6f96457b
	$ git cat-file -t 311e1ea1b63dc428575270b9d4801e3e6f96457b
	tag
	$ git rev-parse v5.2-rc1^0
	a188339ca5a396acc588e5851ed7e19f66b0ebd9
	$ git cat-file -t a188339ca5a396acc588e5851ed7e19f66b0ebd9
	commit

So v5.2-rc1 is a tag and v5.2-rc1^0 is a commit. And if you check the
output of git cat-file -p 311e1ea1b63dc428575270b9d4801e3e6f96457b you
see that v5.2-rc1 references a188339ca5a396acc588e5851ed7e19f66b0ebd9.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux