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 

   - 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 

Reply via email to