Is it "dent" or "dint"?
According to Wiktionary, both dent and dint come from Old English dynt (pre-900), which became Middle English dynt, dent, dunt, and dint. The short vowel sounds denoted by I and E are in free variation in many English dialects, and have been, so far as I know, for most of English history. Before English spelling was fixed, they would have been spelt freely as well, and thence the minor discrepancy.
All these words originally referred to a blow, kick, or strike, and were gradually extended by analogy till they lost that meaning in most dialects. (Dunt is preserved in Scottish.) Both dent and dint now refer to the result of a blow, while dint—as in “by dint of”—also refers to means or force.
Also note that we get indent (and indentation) from a different source: the French endenter, to literally “entooth” something by giving it notches or jags. Dent in all its forms is much older, and could not have been influenced by indent, in case you were curious.