Changed git hook to get branch from refs