Someone took a version (unknown to me) of Moodle, applied many changes within a directory, and released it (tree here).
How can I determine which commit of the original project was most likely edited to form this tree?
this would allow me to form a branch at the appropriate commit with this patch. Surely it came from either the 1.8 or 1.9 branches, probably from a release tag, but diffing between particular commits doesn't help me much.
Postmortem Update: knittl's answer got me as close as I'm going to get. I first added my patch repo as the remote "foreign" (no commits in common, that's OK), then did diffs in loops with a couple format options. The first used the --shortstat
format:
for REV in $(git rev-list v1.9.0^..v1.9.5); do
git diff --shortstat "$REV" f7f7ad53c8839b8ea4e7 -- mod/assignment >> ~/rdiffs.txt;
echo "$REV" >> ~/rdiffs.txt;
done;
The second just counted the line changes in a unified diff with no context:
for REV in $(git rev-list v1.9.0^..v1.9.5); do
git diff -U0 "$REV" f7f7ad53c8839b8ea4e7 -- mod/assignment | wc -l >> ~/rdiffs2.txt;
echo "$REV" >> ~/rdiffs2.txt;
done;
There were thousands of commits to dig through, but this one seems to be the closest match.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…