implemented apply functions on diff files between HEAD and selected branch