Obstetric fistula and other genital tearing from childbirth are discussed in basically one medieval medical text, a section of the 12th-century Trotula known as De curis mulierum or On the Treatments of Women. The text, which scholar Monica Green argues is based on the teachings of an actual female physician called Trota of Salerno (although other scholars like Helen Jewell have countered sounds more pseudonymous), comments on tearing in a couple of places:
On Dangerous Things Happening to Women Giving Birth
For there are some women in whome the vagina and the anus become one opening and the same patheway...We give aid to such women by repositioning [the womb]. We put on the womb warm wine in which butter has been boiled, and diligently we foment it until the womb has been rendered soft, and then we replace it. Afterward we sew the rupture between the anus and the vagina in three or four places with a silk thread. Then let us smear it with liquid pitch. This makes the womb withdraw because of its stench. And we hear the rupture with a powder...and the woman should be place din bed so that her feet are higher.
And then, for subsequent births, so it doesn't happen again:
Let a cloth be prepraed in the shape of an oblong ball and place it in the anus, so that in each effort of pushing out the child, it is to be pressed into the anus firmly so there not be a continuity of this kind.
Later, in a section with a discomforting label:
On Rupture of the Genitals After Birth
Take root of comfrey, dry it and then pulverize it well, and put it with very fine powder of cumin and cinnamon in the vagina, and the rupture will be solidified.
I'm not entirely sure what ruptura there is referring to that sprinkling spices and powder on it would help in a way that, as described above, stitches wouldn't, but there you go.
Now, as I mentioned above, Trotula is a unique medieval text and comes out of a very specific and educated context, the medical community of Salerno in southern Italy at a time when Arabic medicine is beginning to have an impact in Latin Europe. It's tough to say how much the prescriptions here either reflect contemporary practice, or how effective they proved. Nevertheless, it seems apparent that the focus was on stopping the bleeding, preventing it from restarting (I did not quote a lengthy paragraph on how the woman must rest for a week, no seriously, she needs to stay in bed, no, I mean it, she shouldn't get up, and also no coughing)--and, in a wonderful show of optimism for the future, preventing tearing from happening the second time around.
13th century author Gilbertus Anglicus does basically repeat much of the Trotula in his Compendium of Medicine, including some of the remarks on perineal tearing. He does add the detail that the thread used for stitching should be red.