Git Partial Order Overlay Code Identifiers

I am converting infrastructure in my workplace to use git instead of svn. General migration is going well, but we have a tool that I developed to migrate our SQL schemas.

To deal with individual schema change dependencies, the script migration used the subversion keyword substitution to put the last changed version number in the schema. With git, we cannot use the same idea, since the change history is non-linear (and we fully intend to use the branch functions).

Therefore, how do I get a topologically sorted list of commit identifiers from git? Given that someone has a better idea, how to deal with this problem?

+3
source share
2 answers
git rev-list old-revision..new-revision

This shows the newest. If you want to start from the very beginning, add--reverse

+2
source

If you want to have a way to track where the file came from in the source code repository, you may need to examine the tagging of your work and find a way to tag the file with the tag it came from. Some of these depend on your actual deployment process, but my short answer is to replace the svn keywords with a tag-based mechanism. (Perhaps this was what you should have done in svn all the time, actually.)

, " ", , , .

0

Source: https://habr.com/ru/post/1732229/


All Articles