On Tue, Aug 31, 2021 at 4:05 AM Bagas Sanjaya <bagasdotme@xxxxxxxxx> wrote: > > On 31/08/21 09.26, Elijah Newren via GitGitGadget wrote: > > Here are some patches to add a --remerge-diff capability to show & log, > > which works by comparing merge commits to an automatic remerge (note that > > the automatic remerge tree can contain files with conflict markers). > > > > Here are some example commits you can try this out on (with git show > > --remerge-diff $COMMIT): > > > > * git.git conflicted merge: 07601b5b36 > > * git.git non-conflicted change: bf04590ecd > > * linux.git conflicted merge: eab3540562fb > > * linux.git non-conflicted change: 223cea6a4f05 > > > <snip>... > > In regards to the performance point above, the timing for running the > > following command: > > > > time git log --min-parents=2 --max-parents=2 $DIFF_FLAG | wc -l > > > > > > in linux.git (with v5.4 checked out, since my copy of linux is very out of > > date) is as follows: > > > > DIFF_FLAG=--cc: 71m 31.536s > > DIFF_FLAG=--remerge-diff: 31m 3.170s > > > > > > Note that there are 62476 merges in this history. Also, output size is: > > > > DIFF_FLAG=--cc: 2169111 lines > > DIFF_FLAG=--remerge-diff: 2458020 lines > > > > Which repo did you mean by linux.git? Kernel developers often work > against Linus' mainline tree [1], while end-users (including myself) > prefer stable tree (which is mainline + stable release branches and > tags) [2]. > > [1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git > [2]: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git $ git remote -v origin git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git (fetch) origin git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git (push) $ git log -1 origin/master commit 11a48a5a18c63fd7621bb050228cebf13566e4d8 (tag: v5.6-rc2, origin/master, origin/HEAD, master) Author: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> Date: Sun Feb 16 13:16:59 2020 -0800 Linux 5.6-rc2 $ git log -1 HEAD commit 219d54332a09e8d8741c1e1982f5eae56099de85 (HEAD, tag: v5.4) Author: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> Date: Sun Nov 24 16:32:01 2019 -0800 Linux 5.4