Skip to content

Have git handle 'autostash' directly to address kdesrc-build bugs in local change detection

Michael Pyne requested to merge fix-git-stash into master

@dfaure has noted continuing issues with kdesrc-build in trying to stash what it believes are local changes, the stash being empty, and then kdesrc-build throwing an error trying to restore the non-existent stash.

Rather than trying to predict what git will decide is stash-able, and what is not, we can just use git to do the autostashing directly. It's been supported since at least git 2.6 (Sep 2015), which we can assume has been deployed to enough users to rely on being available.

I do this by adapting the existing 'update existing checkout' code to include --autostash when it calls git-rebase and removing a bunch of now-redundant code.

It passes test suite and some test updates I've done locally, including modules with stash-able changes.

Since it touches a major part of kdesrc-build I wanted to put it out there for review before I push to master.

Merge request reports