This is one of many songs using the "who's gonna shoe ..." sequence, such as the Carter Family's "Storms Are On the Ocean" and Woody Guthrie's "Hard, Ain't It Hard" (in the legacies section) and "I Truly Understand" and "More Pretty Girls Than One" (in this section).
This sequence goes back to Child #76 "The Lass of Roch Royal" (aka "Lord Gregory") and probably farther. It also appears in Sharp's English Folksongs From the Southern Appalachians and Lomax's Folk Songs of North America.