Repairing pinhole leaks

I noticed a small spot of water on the basement floor this morning and
looked up to see a tiny pinhole leak in the copper pipe (tube?) directly
above. It leaks a droplet every few hours, so it's something that a rag is
absorbing for now.

What's the best way to repair it? It's near a joist hanger strap and I
suspect the damage was causing by an errant hammer blow and not inherent
vice. But that's just a guess. For all I know, pinholes are about to
emerge throughout the house.

This is the first pinhole leak I've ever seen in the house. Every other
leak (and in a 70 year old house there have been a few) has been at
copper/iron union, a coupling or a valve.

Bobby G.