GitLab Pages: Simplify way of checking the latest commit of a branch in UpdatePagesService
From https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/18099/diffs#note_65867480:
The only thing we're interested in here is the SHA of the tip of the branch.
Surely, I thought to myself. Surely there's a way to get that by parsing only the refs?
Closest I found was
project.repository.rev_list(including: [build.ref]).split("\n").first
, but I'm not convinced it's > the same thing. WDYT?
It looks to me that git rev-list
still opens pack files to traverse the commits. We might be able to resolve this via git log -n 1 <branch name>
.
/cc: @ayufan, @nick.thomas