dr.faruqi says that ghalib did not borrow from older poets:
Rather, on a number of occasions Mir has even directly translated from the old [Persian] poets. Ghalib has perhaps never done this at all.
it could be coincidental, but there are lines in ghalib that appear to be direct translations from arabic or persian. for example:
ghalib:
ki mere qatl ke ba’ad us ne jafaa se tauba
haay us zood pashemaN ka pashemaN hona!
after killing me, the [killer] repented from treachery;
alas! the remorse of one who quickly repents!
qattal al-kilabi:
ولما رأيت أنني قد قتلته * ندمت عليه أي ساعة مندم
wa lamma ra’aytu annani qad qataltuhu
nadimtu `alayhi ayya sa`ati mandami
when i saw that i had slain him
i regretted it, alas! remorse, and when!