diff options
Diffstat (limited to 'lib-src')
-rw-r--r-- | lib-src/mr/config | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lib-src/mr/config b/lib-src/mr/config index 2a7673c2..1a2aa363 100644 --- a/lib-src/mr/config +++ b/lib-src/mr/config @@ -409,11 +409,16 @@ post_checkout = cd primary; ./autogen.sh autoconf # help here). So for convenient updates of "$(hostname -s)" to its conceptual # upstream, we have this definition. "pull" not "update" because we want to # update from upstream deliberately, not as part of automated updates. -pull = git checkout "$hostname" \ - && git pull --rebase --autostash origin \ - "${1:-$(git reflog $hostname -1 --pretty='%gs' \ - --grep-reflog='^pull --rebase --autostash origin ' \ +pull = + branch="${1:-$(git reflog $hostname -1 --pretty='%gs' \ + --grep-reflog='^pull --rebase --autostash origin' \ | awk '{print $5}')}" + if [ -n "$branch" ]; then + git co "$hostname" + git pull --rebase --autostash origin "$branch" + else + echo >&2 "Don't know what to pull; try 'mr pull BRANCH'."; exit 1 + fi skip = lazy || git_worktree_skip [src/emacs/release] |