added utility function to hide casting/fsoperations access to commit.
helper function to get githash of fileobject.