git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* time needed to rebase shortend by using --onto?
@ 2021-05-26 10:09 Uwe Kleine-König
  2021-05-26 11:04 ` Bagas Sanjaya
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Uwe Kleine-König @ 2021-05-26 10:09 UTC (permalink / raw)
  To: git; +Cc: entwicklung

[-- Attachment #1: Type: text/plain, Size: 1965 bytes --]

Hello,

I have a kernel topic branch containing 4 patches on top of Linux v5.4.
(I didn't speak to the affected customer, so I cannot easily share the
patch stack. If need be I can probably anonymize it or ask if I can
publish the patches.)

It rebases clean on v5.10:

	$ time git rebase v5.10
	Performing inexact rename detection: 100% (36806539/36806539), done.
	Performing inexact rename detection: 100% (36806539/36806539), done.
	Performing inexact rename detection: 100% (36806539/36806539), done.
	Performing inexact rename detection: 100% (36806539/36806539), done.
	Successfully rebased and updated detached HEAD.

	real	3m47.841s
	user	1m25.706s
	sys	0m11.181s

If I start with the same rev checked out and explicitly specify the
merge base, the rebase process is considerably faster:

	$ time git rebase --onto v5.10 v5.4
	Performing inexact rename detection: 100% (36806539/36806539), done.
	Performing inexact rename detection: 100% (36806539/36806539), done.
	Performing inexact rename detection: 100% (36806539/36806539), done.
	Performing inexact rename detection: 100% (36806539/36806539), done.
	Successfully rebased and updated detached HEAD.

	real	1m20.588s
	user	1m12.645s
	sys	0m6.733s

Is there some relevant complexity in the first invocation I'm not seeing
that explains it takes more than the double time? I would have expected
that

	git rebase v5.10

does the same as:

	git rebase --onto v5.10 $(git merge-base HEAD v5.10)

. (FTR:

	$ time git merge-base HEAD v5.10
	219d54332a09e8d8741c1e1982f5eae56099de85

	real	0m0.158s
	user	0m0.105s
	sys	0m0.052s

, 219d5433 is v5.4 as expected.

	$ git version
	git version 2.29.2

That's from the Debian package 1:2.29.2-1~bpo10+1 on a Debian 10 box.)

Best regards
Uwe

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

end of thread, other threads:[~2021-05-29 16:59 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-26 10:09 time needed to rebase shortend by using --onto? Uwe Kleine-König
2021-05-26 11:04 ` Bagas Sanjaya
2021-05-26 14:38 ` Elijah Newren
2021-05-27 21:59   ` Uwe Kleine-König
2021-05-27 22:15     ` Uwe Kleine-König
2021-05-28  5:38       ` Elijah Newren
2021-05-27 23:08     ` Elijah Newren
2021-05-28 21:40       ` Uwe Kleine-König
2021-05-28 22:26         ` Elijah Newren
2021-05-29 16:59         ` Felipe Contreras
2021-05-26 22:18 ` Junio C Hamano
2021-05-27 22:16   ` Uwe Kleine-König

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 NNTP newsgroup(s).