Having both merge_requests.merged_commit_sha and merge_requests.merge_commit_sha might be confusing
Problem to solve
We recently added a column merged_commit_sha
to the merge_requests
table to track the "actually merged SHA" for any merge method. The problem is that there is just a one-letter difference with the existing column merge_commit_sha
, the SHA for the "actually merged merge commit" (i.e. for non-fast-forward merges).
Additional context
The following discussion from !130763 (merged) should be addressed:
-
@kerrizor started a discussion: (+3 comments)
These names feel dangerously alike, and I wish I'd noticed sooner so we didn't do this. I'm really quite concerned this is going to cause a lot of confusion.
Possible solutions
- Do we actually need both columns? Maybe we can just let
merge_commit_sha
cover both use cases? The downside of this is that we might no longer know whether the merge was a fast-forward or had a merge commit. - Is the name actually going to cause problems? We already have a
MergeRequests#merged_commit_sha
method that could have been named differently for the same reason. Has it already caused confusion? - Rename the column. The best name I can come up with is
actually_merged_commit_sha
, but I am very open to improvements.