Until the expiration of the time allowed for redemption, the court or judge thereof may restrain the commission of waste on the property by order granted with or without notice, on the application of the purchaser or judgment creditor. It shall not be deemed waste for the person in possession of the property at the time of sale or entitled to possession afterwards during the period allowed for redemption to continue to use it in the same manner in which it was previously used, or to use it in the ordinary course of husbandry, or to make the necessary repairs to buildings thereon, or to use wood or timber on the property therefor or for the repair of fences, or for fuel in his family while he occupies the property.