Weakest hypothesis for integration by parts

Proposition: Assume that $f$ is absolutely continuous on $[a,b]$ and $g\in L^1([a,b])$. For $x\in[a,b]$, denote $G(x)=\int_a^xg~dm$. Then $$\int_a^b fg~dm=f(b)G(b)-f(a)G(a)-\int_a^bf'G~dm.\tag{1}$$

Proof: Since both $f$ and $G$ are absolutely continuous on $[a,b]$, $fG$ is also absolutely continuous on $[a,b]$, and
$$(fG)'(x)=f'(x)G(x)+f(x)g(x)\quad a.e. x\in[a,b].\tag{2}$$ Integrating $(2)$ over $[a,b]$, $(1)$ follows. $\quad\square$

Remark: If $f$ is differentiable on $[a,b]$ and $f'\in L^1([a,b])$, then $f$ is absolutely continuous on $[a,b]$. See, for example, Theorem 7.21 in Real and Complex Analysis(Third Edition) by Walter Rudin.