Skip to content

git: Automatically reapply stashed changes if possible.

Michael Pyne requested to merge work/auto-apply-stash into master

In the event that the stash does not apply a "post-build" message is issued to warn the user. Otherwise there is an in-situ message.

This addresses user feedback I have received on Invent and IRC. In particular re-fixes #42 (closed) and bug 420933, and fixes #49 (closed).

All that I do here is to use the existing logic and add "git stash pop" after the update phase has completed. I've previously tried --autostash (see !32 (closed) and !45 (closed)) and that had issues of its own. Using this approach allows us to use rely on git directly without risk of missing a merge conflict that git sometimes seems to generate with git pull --autostash (see !32 (comment 46926)).

The merge request !61 (closed) may still be applicable. I haven't looked long enough to tell if there's more on it than the --autostash feature which still causes us problems... it's possible that there's a more reliable method than what we're doing though we've already taken pains to simplify this routine because of the recurring stash failures that we've seen previously.

BUG:420933

Merge request reports