myme5261314
myme5261314

Reputation: 462

check unmanaged folder diverse from which git commit

Say we have a folder project_A which is managed by git.

And say we know that another folder project_A_fork, which is not managed by git, diverse/fork from certain commit of project_A commit tree history.

For project_A_fork, another author had modified a few content, and the project_A were upgraded by the public community commits meanwhile.

So, how can we know which commit point the project_A_fork start to diverse/fork from project_A.

Just for a non-optimal approach:

Iterate all the commit in project_A's commit history and statistics the diff amount (num of addition and deletion) for project_A_fork compare to each commit folder status. And choose the commit that the diff amount is the most smallest one.

Does anyone has a better solution?

Upvotes: 0

Views: 118

Answers (1)

Schwern
Schwern

Reputation: 164819

You can't really know what commit project_A_fork was copied from if it's been modified, but there are some common tells to narrow the search.

Contributors rarely touch things like version numbers, README files, or change logs. First thing I'd look for is a version number and diff based on that. Then I'd look for README files, change logs, and other administrative files they're unlikely to touch and see if they match a particular commit. This will bound your search for a match.

Usually people who aren't using version control will be working from a source release, so I'd compare only releases of the project to see which one came closest.

Upvotes: 1

Related Questions