Heat the ghee or oil in a wide, lidded pan over a medium-high flame, and sauté the mustard and cumin seeds until they sizzle; about 1 to 2 minutes. Add the onions and cook until soft and golden at the edges. Stir frequently, adding a splash of water if needed to keep the onions from sticking to the bottom of the pan. Lower the heat to medium if the onions are browning too quickly before softening up. Don’t hurry this phase because you are building flavor. This step can take anywhere from 10 to 16 minutes, or more if necessary.
Add the garlic and ginger paste and the minced green chilies into the onions and cook, stirring, for another 3 minutes.
Add the puréed tomatoes and curry leaves (if using), and cook until you have a thick paste; about 8 to 10 minutes. If using crushed or fresh tomatoes, it will take 3 to 4 minutes longer.
Add the pork or chicken and marinade to the pan and turn the heat up to medium-high. Stir well and add the sugar, tamarind, and salt. Bring to a simmer, cover tightly, turn the heat to low and cook on the stovetop for an hour. Or if you prefer and are using pork, you can cover and cook in a preheated oven at 350F° (180°C), also for an hour. Check for liquid levels at least twice during the cooking time, and if it is dry (the meat should be almost covered), add a 1/4 cup of water. If you are cooking chicken, this step will only take 10 minutes or so.
For pork: Remove the lid and cook for another 30 minutes, until the meat is very tender and the sauce has thickened. For chicken: Remove the lid and cook for another 5 minutes over low heat to reduce the sauce and mellow out the flavors.
Taste for the acid, sweet, heat balance, and serve over rice. Garnish with coarsely chopped cilantro.