Tuesday, June 23, 2009

Finding Cycles in Git Commit Graphs

Git's data model is a directed acyclic graph of commits. Using .git/info/grafts one can accidentally create cycles in this graph. I wrote the following script to detect those cycles and help me determine which grafts might have caused the problem. In most cases, it's helped me narrow the problem down far enough that I can resolve the problem manually.

0 comments: