Skip to content

Commit

Permalink
Use origin/master instead of master for av-diff base (#497)
Browse files Browse the repository at this point in the history
The master branch can be behind.
  • Loading branch information
draftcode authored Dec 23, 2024
1 parent d74dd04 commit fbcb5bf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/av/diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ Generates the diff between the working tree and the parent branch
// expects.
// This roughly matches the diff that GitHub will show in the pull
// request files changed view.
diffArgs = append(diffArgs, "--merge-base", branch.Parent.Name)
remoteName := repo.GetRemoteName()
diffArgs = append(diffArgs, "--merge-base", remoteName+"/"+branch.Parent.Name)
} else {
// For a non-root branch, we compare against the original branch point.
// We don't want to compare exactly against the parent branch since
Expand Down

0 comments on commit fbcb5bf

Please sign in to comment.