Let $U$ be an open set in $\mathbb{C}$ and $f: U \to E$ be holomorphic on $U.$ Let now $\gamma$ be a path in $U$ that begins with $z_1\in U$ and ends with $z_2 \in U.$ I wonder for which assumptions the following formula $$\int_\gamma \frac{d f}{dz}(z) = f(z_2)-f(z_1)$$ is true ?
I have found many counterexamples (such as $f'(z) = \frac 1z$) where the above formula fails if the set $U$ is not simply connected. Here is a related result.
Another question, if $f$ is well defined on $\bar{U}$ and $z_1 \in \partial U$ is the above formula also true ?
If $f$ is holomorphic in $U \subset \Bbb C$ and $\gamma$ is a (piecewise differentiable) path in $U$ joining $z_1$ and $z_2$ then $$ \int_\gamma f'(z)\, dz = \int_0^1 f'(\gamma(t)) \gamma'(t) \, dt = \bigl [ f(\gamma(t))\bigr ]_{t=0}^{t=1} = f(z_2) - f(z_1) $$
So that relation holds always, even in multiply connected domains.
$$ \int_{|z|=1} \frac 1z \, dz = 2 \pi i \ne 0 $$ is not a counter-example, because $1/z$ is not the derivative of a holomorphic function $f$ in any domain containing the unit circle.