Jon says “Of all the girl-friend murdering songs this must be the one with the most inappropriate tune. Somehow that makes it all the more horrific, particularly with the unusual denoument. Don’t know of any other versions where she gets her own back. Nice.”
This one seems to be from the same root and essentially the same story as The Cruel Ship’s Carpenter and they all seem to spring from a song called The Gosport Tragedy. The earliest printed version of that dates from 1767 and apparently it’s a bit of an epic with over 30 verses. The song combines the fairly common murder of the pregnant girl with the Jonah tradition. The latter is of course very old, but is essentially the simple idea that a becalmed or storm tossed ship is being punished on account of the wrong doing of one or more of the crew. I was going to add a link in here, but came across so much tripe trying to work out how Jonah could have survived I gave up. So, (ahem!) anyway There are numerous versions of this on both sides of the Atlantic and it seems to have been particularly popular in the US with lots of comparatively recent recordings. You can Wiki here where the song is called Pretty Polly and apparently feeds directly into Dylan’s The Ballad Of Hollis Brown and Nirvana’s Polly.