diff options
Diffstat (limited to 'src/script/ceph-backport.sh')
-rwxr-xr-x | src/script/ceph-backport.sh | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/script/ceph-backport.sh b/src/script/ceph-backport.sh index f4f88499409..c216ed32d9b 100755 --- a/src/script/ceph-backport.sh +++ b/src/script/ceph-backport.sh @@ -258,13 +258,13 @@ function cherry_pick_phase { fi set -x - git fetch "$upstream_remote" + git fetch "$upstream_remote" "refs/heads/${milestone}" if git show-ref --verify --quiet "refs/heads/$local_branch" ; then if [ "$FORCE" ] ; then if [ "$non_interactive" ] ; then git checkout "$local_branch" - git reset --hard "${upstream_remote}/${milestone}" + git reset --hard FETCH_HEAD else echo echo "A local branch $local_branch already exists and the --force option was given." @@ -276,7 +276,7 @@ function cherry_pick_phase { [ "$yes_or_no_answer" ] && yes_or_no_answer="${yes_or_no_answer:0:1}" if [ "$yes_or_no_answer" = "y" ] ; then git checkout "$local_branch" - git reset --hard "${upstream_remote}/${milestone}" + git reset --hard FETCH_HEAD else info "OK, bailing out!" false @@ -289,10 +289,10 @@ function cherry_pick_phase { false fi else - git checkout "${upstream_remote}/${milestone}" -b "$local_branch" + git checkout -b "$local_branch" FETCH_HEAD fi - git fetch "$upstream_remote" "pull/$original_pr/head:pr-$original_pr" + git fetch "$upstream_remote" "$merge_commit_sha" set +x maybe_restore_set_x @@ -779,7 +779,7 @@ function maybe_deduce_remote { else assert_fail "bad remote_type ->$remote_type<- in maybe_deduce_remote" fi - remote=$(git remote -v | grep --extended-regexp --ignore-case '(://|@)github.com(/|:|:/)'${url_component}'/ceph(\s|\.|\/)' | head -n1 | cut -f 1) + remote=$(git remote -v | grep --extended-regexp --ignore-case '(://|@)github.com(/|:|:/)'${url_component}'/ceph(\s|\.|\/|-)' | head -n1 | cut -f 1) echo "$remote" } |