-1

There is a big project A. One person downloaded this project A and then modified it. Then he uploaded it to his github. I want to know what changes he made. But he did not fork A, and then pushed on the basis of A. When I looked at his submission record, I found that all the files were marked as new. But I just want to know what changes he made compared to the original project A?

This is the situation. I am reading a paper, this paper uses gem5 to do some things, and then upload what it does (call it A) to github. Another person downloaded A, then made some modifications on A (called B after the modification), and then uploaded it to his own warehouse. But I want to know what changes A made on gem5 and what changes B made on A. But I guess they did not fork, and then changed on the basis of fork. So when I look at their commit record. I found that A’s submission record included all files as new additions (It marks all the original gem5 files as newly added. but I want to know what changes it has made compared to the original gem5). And B's commit record does not seem to see any key file records.

The address of A is: https://github.com/mjyan0720/InvisiSpec-1.0

B’s address is: https://github.com/gururaj-s/cleanupspec

Gerrie
  • 736
  • 3
  • 18
  • Hi. Do you mean that the second repository just copied the files from the first, without git information and then just created a new repo (with little or no history)? If that is the case, then the best you can do is a regular non-git diff, as the git history information is permanently lost: https://stackoverflow.com/questions/2019857/diff-files-present-in-two-different-directories – Ciro Santilli Oct 20 '20 at 20:07
  • If there was an easy way to compare the initial import commit with the original commits of the project to find the base commit, that would basically solve things, but I don't see how that can be done without comparing every file with every commit. But you could likely make good guesses based on dates and some quick inspection of sources. I would also email the author to see if they remember. – Ciro Santilli Oct 20 '20 at 20:11
  • You could also try to bisect features to mainline commits with non-git diff. This will likely work. Do a diff, determine if some change is present or not on mainline., and continue bisecting this way until you find the closest commit. – Ciro Santilli Oct 20 '20 at 20:21
  • Does this answer your question? [How do I compare two git repositories?](https://stackoverflow.com/questions/687450/how-do-i-compare-two-git-repositories) – Joe Oct 21 '20 at 01:11

1 Answers1

0

I know the answer now. I first downloaded an unmodified version of gem5. Then I commit. Then I copied all the contents of Project A directly, and then committed again. Then I copied B in again and committed it again. In this way, I can get the location of their modification from the commit, without knowing which node they are all modified from.

Gerrie
  • 736
  • 3
  • 18