> diff between those commits *excluding* merge commit changes, What does this mean?
If we have commit sequence ``` A-B-C-M-D-E-F / S-T-U ``` and want you complete diff between A..F, but somehow excluding merge M (and hence S-T-U), what does that mean. Was the merge clean, or were there conflict fixups? Do you mean A..C plus D..F Do you have an example of the perceived Github way of doing things? P. On Tuesday, February 21, 2023 at 5:27:20 AM UTC s...@codeapprove.com wrote: > Hello all, > > This is an *extremely* specific question which I've been trying to get an > answer to for quite a while now, so hopefully someone here knows the answer. > > Let's say I am starting from nothing, an empty directory on a server. I > have: > > - The URL for a public git repository > - Two endpoint SHAs (commits on the same branch) > > I want to get the complete diff between those commits *excluding* merge > commit changes, and I want to do this as fast as possible (so much faster > than cloning everything and diffing). > > I am able to get almost there with the following sequence: > > # Fast clone > git clone --verbose --no-checkout --filter=blob:limit=250k --single-branch > --branch=${branch} --depth=${depth} $REPO_URL > > # Get a series of patches > git log --no-merges --first-parent --patch ${base.sha}..${head.sha} > > However I need to get a *single* patch that represents all the changes > combined, not a series of patches from the log. In theory I could combine > the series of patches I get but I have found that task exceedingly > difficult (suggestions welcome!) > > This might sound like a wacky task, but it's actually quite commonly done. > If you are using GitHub to view the changes in a pull request and select a > range of commits which includes a merge, GitHub does this exact operation > on the backend. I just can't figure out how. > > Any pointers welcome! > > - Sam > > > > -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/git-users/1170d470-a027-497b-ae46-ff5bd325e497n%40googlegroups.com.