bug in git-log with funny merges

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

 



Hello,

TL;DR: how can @~..v5.4.27 be empty, but @..v5.4.27 contain commits?

I hit a situation with git that I don't understand. After asking in #git
I found two others who agree this is strange and I should report here.

You can recreate my history with the following commands:

	$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
	$ cd linux
	$ git remote add -f stable git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
	$ wget https://www.kleine-koenig.org/tmp/funnymerge
	$ git fetch funnymerge HEAD
	$ git checkout FETCH_HEAD

With that in place I have:

	$ git log --oneline --boundary --graph v5.4.27..
	*---.   86fd3e9df543 (HEAD) customers/sample/20200324-1
	|\ \ \  
	| | | * 6bfe59d959c3 iio: dac: ltc2632: remove some unused defines
	| | | * fc25f80fa2d6 iio: dac: ltc2632: add support for LTC2636 family
	| | | * aaf713847341 iio: dac: ltc2632: drop some duplicated data
	| | | * 36f4e0527245 dt-bindings: iio: ltc2632: expand for ltc2636 support
	| | * | dd98c18c4ae4 rtc: pcf2127: implement reading battery status bits
	| | |/  
	| * | 2704eba85eb7 serial: imx: use hrtimers for rs485 delays
	| * | 6fde0395f781 serial: imx: implement rts delaying for rs485
	| * | c288981265b7 serial: imx: support an enable-gpio
	| * | a7198bfcc09f serial: imx: fix a race condition in receive path
	| * | 38777ea60445 tty: serial: imx: use the sg count from dma_map_sg
	| * | 9dabd7937faf serial: imx: adapt rx buffer and dma periods
	* | | d1437a91a10e Release customers/sample/20200324-1
	* | | 803aad81ca69 iio: dac: ltc2632: remove some unused defines
	* | | 8a4579487b00 iio: dac: ltc2632: add support for LTC2636 family
	* | | 25a9309d7ded iio: dac: ltc2632: drop some duplicated data
	* | | e8f40385c55d dt-bindings: iio: ltc2632: expand for ltc2636 support
	* | | b95a62694eae rtc: pcf2127: implement reading battery status bits
	* | | f5af38a6b7a1 serial: imx: use hrtimers for rs485 delays
	* | | 14075cd0ce1b serial: imx: implement rts delaying for rs485
	* | | 338647d2ab5c serial: imx: support an enable-gpio
	* | | b31f3c6fbc18 serial: imx: adapt rx buffer and dma periods
	o | | 585e0cc08069 (tag: v5.4.27, stable/linux-5.4.y) Linux 5.4.27
	 / /  
	o / da0c9ea146cb (tag: v5.4-rc2) Linux 5.4-rc2
	 /  
	o 219d54332a09 (tag: v5.4) Linux 5.4

(This is a tree format we use to archive kernel trees for our customers.
It contains a snapshot of the relevant topic branches and a
linearisation to put into a quilt stack.)

So v5.4.27 is an ancestor of HEAD:

	$ git merge-base --is-ancestor v5.4.27 @ && echo yes
	yes

But!:

	$ git rev-list --count HEAD..v5.4.27
	3868

So there are 3868 patches that are in v5.4.27 but not HEAD? I would have
expected zero. Also

	$ git log HEAD..v5.4.27

lists commits, but

	$ git log HEAD~..v5.4.27

does not. (The latter is expected.)

I tested with git 2.26.0 and also git 2.0.0 and on different machines,
with the same results.

Am I missing something, or is there a (quite old) bug in git somewhere?

Best regards
Uwe

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



[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