How do I get the list of files that are about to be updated (or were just updated) by git pull so i can parse them and take appropriate action in a script?
A more generic solution than @obmarg's answer is this:
git fetch && git diff --name-only @ @{u}
Here @ is a shortcut for HEAD which in turn is a pointer to your currently checked out branch. @{u} or @{upstream} denotes the tracking branch for HEAD. So no hardcoded assumptions about the current branch (master), the name of the remote (origin) or the name of the tracking branch (origin/master) is necessary.
If you want to do this with another branch, use this:
git fetch && git diff --name-only master master@{u}
The syntax for @{u} is explained in git help revisions, search for upstream.