Checking if a git repository needs to be updated
Your function has the side-effect of switching the directory to the file's path.  To be side-effect-free, you should let l:current_path = getcwd() instead.  Better yet, use the --git-dir and --work-tree options to git(1) to avoid having to cd at all.

You always query the remote named origin, but pull from `git remote`.  That inconsistent looks like a bug.

I don't see any reason to use --abbrev-ref when the result is not intended for human consumption.  Just use the full commit id.