Skip to content

Commit a18b83d

Browse files
authored
Merge pull request #467 from Martchus/avoid-conflicts
Avoid conflicts in PRs created via `os-autoinst-obs-auto-submit`
2 parents 53e015c + e8383fa commit a18b83d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

os-autoinst-obs-auto-submit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,10 @@ make_git_submit_request() {
115115
cd "$package"
116116
$git switch "$branch"
117117

118+
# base our changes on the latest state of the target repository (which is added as remote "parent" by git-obs)
119+
$git fetch parent || return $?
120+
$git reset --hard "parent/$branch"
121+
118122
# remove everything and replace it with the updated files we have just created (in the calling function)
119123
rm -v ./*
120124
cp -v ../../"$package"/* ./

0 commit comments

Comments
 (0)