Whether you have a short-term or long-term capital gain or loss will depend on your holding period. Your holding period is normally the amount of time you actually hold the property that you eventually deliver to the lender in order to close the short sale. For example, if you sell stock short that you do not own, but that you borrow from your broker, and then, over 12 months later, you purchase stock and turn it over to your broker to cover the short sale, you will have a short-term gain or loss on the short sale, because you effectively held the stock used to cover the short sale for less than a day.
If you acquired the substantially identical property after the date of the short sale but on or before the date you close the short sale, the gain or loss on the short sale is short-term. The holding period for the substantially identical property begins on the earlier of the date of closing the short sale or the date on which you sell this property.
But, if you held substantially identical property on the date of the short sale, the gain will be short-term is you held the property for one year or less, and will be long-term if you held it for more than one year. In this latter case, the gain or loss would be long-term even if you held the actual property used to close the short sale for one year or less. What makes it long-term is the fact that you held substantially identical property for more than one year.