During a "heated verbal argument", the woman called the defendant a "n....r".
Judge Tony Couch accepted the racial abuse provided a measure of provocation but the onslaught that followed was in no way justified.
McCarthy started by throwing items at the victim: books, CDs and a pot plant among them.
When the woman said she was going to call police, the defendant responded: "I'll give them something to come for."
While she started gathering items in preparation to leave the house, another argument erupted over who was going to leave.
McCarthy started hitting the victim, and did not stop.
"This was a sustained attack," said the judge.
The court heard McCarthy punched and kicked the woman all over her body about 20 times before pushing her on to a mattress on the floor.
The blows continued as the defendant stood over the vulnerable victim.
McCarthy aimed one kick "square in the head", striking the woman over her right eyebrow and causing her to bleed profusely.
The ex-partner fled and sought refuge at a friend's home, court documents said.
Despite the severity of the attack the woman attended yesterday's sentencing and stressed she did not want a protection order made in her favour.
The judge noted a range of aggravating features which included the fact McCarthy was serving a sentence of community work and supervision at the time of the attack.
While he had no violence convictions in the past decade, there was a history of aggressive conduct.
The defendant had two previous assaults, one assault with a weapon and an assault with intent to injure.
Counsel Brendan Stephenson said his client accepted the relationship with his ex was very much over.
McCarthy had an offer of work awaiting him once he was released from prison but Stephenson said the more pressing priority would be securing stable accommodation.
Judge Couch jailed the man for 23 months.
McCarthy had no viable address for home detention but if one became available the judge gave him leave to have the sentence converted.