Both absorb and updatepr fail to push offline, as expected, but still squash the commits on main. Leading to a mismatch from your branch vs the remote. I think the ideal is probably that the commits are left on main as fixups so you have to re-run updatepr once you have a network connection again.
(keith/bazel-spm-examples)[main M M 2] % g absorb -m repo
+ [[ 1 -lt 1 ]]
+ export GIT_SEQUENCE_EDITOR=true
+ GIT_SEQUENCE_EDITOR=true
+ readonly sha_or_branch_to_update=6a33709803c9395858b5ed3bf800b5f233603b74
+ sha_or_branch_to_update=6a33709803c9395858b5ed3bf800b5f233603b74
+ shift
++ git pilebranchname HEAD
+ git show ks/repo
+ squash=false
++ git rev-parse HEAD
+ new_refspec=09a073e6fb6c96eeab333671fe643c8dc94a27d9
++ git rev-parse HEAD
+ base_refspec=09a073e6fb6c96eeab333671fe643c8dc94a27d9
+ [[ 09a073e6fb6c96eeab333671fe643c8dc94a27d9 != 09a073e6fb6c96eeab333671fe643c8dc94a27d9 ]]
+ git show-ref --quiet --verify refs/heads/6a33709803c9395858b5ed3bf800b5f233603b74
+ git cat-file -e 6a33709803c9395858b5ed3bf800b5f233603b74
+ commit_to_update=6a33709803c9395858b5ed3bf800b5f233603b74
++ git pilebranchname 6a33709803c9395858b5ed3bf800b5f233603b74
+ branch_name=ks/update-version
+ git show-ref --quiet ks/update-version
++ git pileworktreepath
+ worktree_dir=/Users/ksmiley/.cache/git-pile/4f2abea893a558b156efab5dfede547b
+ [[ ! -d /Users/ksmiley/.cache/git-pile/4f2abea893a558b156efab5dfede547b ]]
+ git -C /Users/ksmiley/.cache/git-pile/4f2abea893a558b156efab5dfede547b switch --quiet ks/update-version
+ trap _detach_branch EXIT
++ git -C /Users/ksmiley/.cache/git-pile/4f2abea893a558b156efab5dfede547b rev-parse --abbrev-ref --symbolic-full-name '@{upstream}'
+ branch_with_remote=origin/ks/update-version
+ remote_name=origin
+ remote_branch_name=ks/update-version
+ git -C /Users/ksmiley/.cache/git-pile/4f2abea893a558b156efab5dfede547b fetch --quiet origin ks/update-version
+ git -C /Users/ksmiley/.cache/git-pile/4f2abea893a558b156efab5dfede547b diff --quiet 'HEAD...@{upstream}'
++ mktemp
+ output_file=/var/folders/w7/7x31_2yj0gz5fjrz8yryd77h0000gn/T/tmp.tlbBmpuwK0
+ git -C /Users/ksmiley/.cache/git-pile/4f2abea893a558b156efab5dfede547b cherry-pick '09a073e6fb6c96eeab333671fe643c8dc94a27d9^..09a073e6fb6c96eeab333671fe643c8dc94a27d9'
+ [[ false == true ]]
+ git -C /Users/ksmiley/.cache/git-pile/4f2abea893a558b156efab5dfede547b push --quiet
fatal: unable to access 'https://github.com/keith/bazel-spm-examples.git/': Failed to connect to github.com port 443 after 75003 ms: Couldn't connect to server
+ echo 'warning: failed to push '\''ks/update-version'\'''
warning: failed to push 'ks/update-version'
+ git rebase --quiet --interactive --autostash --exec 'git commit --signoff --no-verify --amend --fixup '\''6a33709803c9395858b5ed3bf800b5f233603b74'\''' '09a073e6fb6c96eeab333671fe643c8dc94a27d9^'
Created autostash: 58569be
[detached HEAD 5f0d2a6] fixup! Update version
12 files changed, 50 insertions(+), 50 deletions(-)
Applied autostash.
+ git rebase --quiet --interactive --autostash --autosquash '6a33709803c9395858b5ed3bf800b5f233603b74^'
Created autostash: d0b545d
Applied autostash.
+ _detach_branch
+ git -C /Users/ksmiley/.cache/git-pile/4f2abea893a558b156efab5dfede547b switch --detach --quiet
(keith/bazel-spm-examples)[main M 2] %
(keith/bazel-spm-examples)[main M 2] %
(keith/bazel-spm-examples)[main M 2] % g co ks/update-version
M .bazelrc
M MODULE.bazel
Switched to branch 'ks/update-version'
Your branch is ahead of 'origin/ks/update-version' by 1 commit.
(use "git push" to publish your local commits)
(keith/bazel-spm-examples)[ks/update-version M 1] % g push
Enumerating objects: 41, done.
Counting objects: 100% (41/41), done.
Delta compression using up to 18 threads
Compressing objects: 100% (27/27), done.
Writing objects: 100% (27/27), 3.71 KiB | 3.71 MiB/s, done.
Total 27 (delta 15), reused 0 (delta 0), pack-reused 0 (from 0)
remote: Resolving deltas: 100% (15/15), completed with 4 local objects.
To https://github.com/keith/bazel-spm-examples.git
aac8867..30ae556 ks/update-version -> ks/update-version
(oss-swift/swift)[main M 4] % g updatepr c04d55ba015
+ [[ 1 -lt 1 ]]
+ export GIT_SEQUENCE_EDITOR=true
+ GIT_SEQUENCE_EDITOR=true
+ readonly sha_or_branch_to_update=c04d55ba015
+ sha_or_branch_to_update=c04d55ba015
+ shift
++ git pilebranchname HEAD
+ git show ks/early-return-merged
+ squash=false
++ git rev-parse HEAD
+ new_refspec=194e48a354b8f50009b8b7430ec581827e82c0c2
++ git rev-parse HEAD
+ base_refspec=194e48a354b8f50009b8b7430ec581827e82c0c2
+ [[ 194e48a354b8f50009b8b7430ec581827e82c0c2 != 194e48a354b8f50009b8b7430ec581827e82c0c2 ]]
+ git show-ref --quiet --verify refs/heads/c04d55ba015
+ git cat-file -e c04d55ba015
+ commit_to_update=c04d55ba015
++ git pilebranchname c04d55ba015
+ branch_name=ks/fix-synthesize-interface-c-interop-make-it-exit-on-failures
+ git show-ref --quiet ks/fix-synthesize-interface-c-interop-make-it-exit-on-failures
++ git pileworktreepath
+ worktree_dir=/Users/ksmiley/.cache/git-pile/64574436e54b0107d2d60b6e56de1f44
+ [[ ! -d /Users/ksmiley/.cache/git-pile/64574436e54b0107d2d60b6e56de1f44 ]]
+ git -C /Users/ksmiley/.cache/git-pile/64574436e54b0107d2d60b6e56de1f44 switch --quiet ks/fix-synthesize-interface-c-interop-make-it-exit-on-failures
+ trap _detach_branch EXIT
++ git -C /Users/ksmiley/.cache/git-pile/64574436e54b0107d2d60b6e56de1f44 rev-parse --abbrev-ref --symbolic-full-name '@{upstream}'
+ branch_with_remote=origin/ks/fix-synthesize-interface-c-interop-make-it-exit-on-failures
+ remote_name=origin
+ remote_branch_name=ks/fix-synthesize-interface-c-interop-make-it-exit-on-failures
+ git -C /Users/ksmiley/.cache/git-pile/64574436e54b0107d2d60b6e56de1f44 fetch --quiet origin ks/fix-synthesize-interface-c-interop-make-it-exit-on-failures
+ git -C /Users/ksmiley/.cache/git-pile/64574436e54b0107d2d60b6e56de1f44 diff --quiet 'HEAD...@{upstream}'
++ mktemp
+ output_file=/var/folders/w7/7x31_2yj0gz5fjrz8yryd77h0000gn/T/tmp.Ly7TiPL3A2
+ git -C /Users/ksmiley/.cache/git-pile/64574436e54b0107d2d60b6e56de1f44 cherry-pick '194e48a354b8f50009b8b7430ec581827e82c0c2^..194e48a354b8f50009b8b7430ec581827e82c0c2'
+ [[ false == true ]]
+ git -C /Users/ksmiley/.cache/git-pile/64574436e54b0107d2d60b6e56de1f44 push --quiet
fatal: unable to access 'https://github.com/swiftlang/swift/': Failed to connect to github.com port 443 after 75002 ms: Couldn't connect to server
+ echo 'warning: failed to push '\''ks/fix-synthesize-interface-c-interop-make-it-exit-on-failures'\'''
warning: failed to push 'ks/fix-synthesize-interface-c-interop-make-it-exit-on-failures'
+ git rebase --quiet --interactive --autostash --exec 'git commit --signoff --no-verify --amend --fixup '\''c04d55ba015'\''' '194e48a354b8f50009b8b7430ec581827e82c0c2^'
Created autostash: a0189c35d92
[detached HEAD c59788efb32] fixup! Fix synthesize-interface C++ interop, make it exit on failures
1 file changed, 1 insertion(+), 3 deletions(-)
Applied autostash.
+ git rebase --quiet --interactive --autostash --autosquash 'c04d55ba015^'
Created autostash: ce70ef5a95d
Applied autostash.
+ _detach_branch
+ git -C /Users/ksmiley/.cache/git-pile/64574436e54b0107d2d60b6e56de1f44 switch --detach --quiet
Both absorb and updatepr fail to push offline, as expected, but still squash the commits on main. Leading to a mismatch from your branch vs the remote. I think the ideal is probably that the commits are left on main as fixups so you have to re-run updatepr once you have a network connection again.