From 813e6429471074bf8fa0a7cf665f324fa3bcbd10 Mon Sep 17 00:00:00 2001 From: "Roscoe A. Bartlett" Date: Mon, 26 Jun 2017 08:24:23 -0600 Subject: [PATCH] Do git fetch before hard reset of 'develop' (#482) This helps to avoid a trival merge commit with lots of changes being made after that. --- cmake/std/sems/remote-pull-test-push.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/cmake/std/sems/remote-pull-test-push.sh b/cmake/std/sems/remote-pull-test-push.sh index efbc799c81dc..e82f43709d26 100755 --- a/cmake/std/sems/remote-pull-test-push.sh +++ b/cmake/std/sems/remote-pull-test-push.sh @@ -77,8 +77,15 @@ git push -f intermediate-repo $local_branch_name:$local_branch_name # Run the remote commands blocking or nonblocking mode # -remote_branch_update_cmnds="cd $remote_trilinos_base_dir/Trilinos && git checkout develop && git reset --hard @{u} && git fetch intermediate-repo && git merge --no-ff intermediate-repo/$local_branch_name" -# NOTE: Above, we do the fetch and merge of the branch before running the +remote_branch_update_cmnds="cd $remote_trilinos_base_dir/Trilinos && git checkout develop && git fetch && git reset --hard @{u} && git fetch intermediate-repo && git merge --no-ff intermediate-repo/$local_branch_name" +# Some notes about the above commands: +# +# First, the remote tracking 'develop' branch is updated to what is in github +# 'develop'. That is done with a fetch followed by a reset --hard. That make +# sure that helps to avoid another trivial merge commit from github 'develop' +# when the checkin-test.py script runs. +# +# Second, we do the fetch and merge of the new branch before running the # checkin-test.py script on the remote machine. That is needed for some use # cases where the checkin-test.py needs to be run given the updated code or it # will not have the right result. For example, when changing a package from