Heat oil in a large skillet over medium. Cook garlic, tossing occasionally, until golden brown, about 3 minutes. Add rosemary and cook, tossing, just until fragrant and starting to brown around edges, about 1 minute. Reduce heat to medium-low, add tomatoes, and bring to a simmer. Cook, stirring often, until mixture is slightly thickened, 5–10 minutes.