fix: add --reverse to get_pr_for_file ancestry lookup (#129)
This commit is contained in:
parent
e40ea2acf2
commit
978dd88347
1 changed files with 2 additions and 1 deletions
|
|
@ -120,8 +120,9 @@ get_pr_for_file() {
|
|||
|
||||
# Step 2: find the merge commit that contains it via ancestry path
|
||||
local merge_line
|
||||
# Use --reverse to get the oldest (direct PR merge) first, not the newest
|
||||
merge_line=$(git -C "$OPS_REPO_ROOT" log --merges --ancestry-path \
|
||||
"${add_commit}..HEAD" --oneline 2>/dev/null | head -1)
|
||||
--reverse "${add_commit}..HEAD" --oneline 2>/dev/null | head -1)
|
||||
|
||||
if [ -z "$merge_line" ]; then
|
||||
return 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue