Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why git log --cherry-pick is so slow?

I want to get the changes between two given tags, the command is:

git log `Tag1...Tag2 --cherry-pick  --no-merges --right-only

but it is very slow.

I test parameters respectively one by one. ONLY when with --cherry-pick, git log is very slow.

Why? Anybody could help me out there?

like image 549
Bruce Li Avatar asked Nov 24 '22 12:11

Bruce Li


1 Answers

--cherry-pick
Omit any commit that introduces the same change as another commit on the "other side" when the set of commits are limited with symmetric difference.

For example, if you have two branches, A and B, a usual way to list all commits on only one side of them is with --left-right (see the example below in the description of the --left-right option). It however shows the commits that were cherry-picked from the other branch (for example, "3rd on b" may be cherry-picked from branch A). With this option, such pairs of commits are excluded from the output.

It must compare all commits looking for similarities - this will be a very slow operation compared to not having to do any comparison at all.

like image 164
Michael Avatar answered Dec 25 '22 23:12

Michael