Bad blood between two men resulted in one being stabbed in the backside.
Lloyd White had fallen out with Toussant Jones about a car, Bristol Crown Court heard.
The court was told White and a youth confronted Mr Jones in an incident in which he was stabbed in his right buttock and had his bag stolen.
White, 27 of Heathcote Road in Fishponds, was due to face trial next week but pleaded guilty to unlawful wounding and theft in December last year.
Judge Euan Ambrose jailed him for two years and ten months.
The judge told him: “There was significant pre-meditation and you took a leading role.”
A 17-year-old youth, who cannot be named for legal reasons, also pleaded guilty to the offences and will be sentenced next month.
Mary Cowe, prosecuting, said White, known to the complainant as “Smiley”, had his face covered and was holding a claw hammer when he and the teenager struck.
The 17-year-old, who also had his face covered, was armed with a machete.
Miss Cowe said: “Mr Jones handed over his man bag.
“It contained £40 in a wallet, an iphone and house keys.
“Mr Jones felt himself being stabbed in the bottom.
“The prosecution says it was a joint attack.”