Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Built-in rebase fails with 'Unexpected stash response' (MVCE included) #1876

Closed
rcdailey opened this issue Oct 11, 2018 · 2 comments
Closed

Comments

@rcdailey
Copy link

rcdailey commented Oct 11, 2018

I get the following error when doing a rebase with a modified working copy (submodule modified) and with the configuration option rebase.autostash set to true:

$ git rebase --no-fork-point master
09:34:43.229716 exec-cmd.c:236          trace: resolved executable dir: C:/Program Files/Git/mingw64/bin
09:34:43.230216 git.c:415               trace: built-in: git rebase --no-fork-point master
09:34:43.230216 run-command.c:637       trace: run_command: git config --bool rebase.usebuiltin
09:34:43.238724 exec-cmd.c:236          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
09:34:43.239725 git.c:415               trace: built-in: git config --bool rebase.usebuiltin
09:34:43.249230 run-command.c:637       trace: run_command: git stash create autostash
09:34:43.263242 exec-cmd.c:236          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
09:34:43.263742 git.c:415               trace: built-in: git stash create autostash
09:34:43.263742 run-command.c:637       trace: run_command: git config --bool stash.usebuiltin
09:34:43.274250 exec-cmd.c:236          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
09:34:43.275251 git.c:415               trace: built-in: git config --bool stash.usebuiltin
fatal: Unexpected stash response: ''

Here is the MVCE (simple bash script you can run):

#!/usr/bin/env bash
set -o xtrace

git init mvce_stash_failure
pushd mvce_stash_failure
git config rebase.autostash true

# Add stuff to master
git init thesubmodule
pushd thesubmodule
echo submodule > submodulefile1
git add submodulefile1
git commit -m 'submodulefile1 added'
popd

git add thesubmodule
git commit -m 'added submodule'

echo value > file1
git add file1
git commit -m 'file1 added'

echo value > file2
git add file2
git commit -m 'file2 added'

# Add stuff to a feature branch
git checkout -b topic1 @^
echo value2 > file2
git add file2
git commit -m 'file2 added'

pushd thesubmodule
echo submodule > submodulefile2
git add submodulefile2
git commit -m 'submodulefile2 added'
popd

# This fails with: fatal: Unexpected stash response: ''
GIT_TRACE=1 git rebase --no-fork-point master

popd
rm -rf mvce_stash_failure

Using Git for Windows v2.19.1 with experimental built-in stash & rebase enabled via installer options.

@rcdailey rcdailey changed the title Rebase fails with 'Unexpected stash response' (MCVE included) Built-in rebase fails with 'Unexpected stash response' (MCVE included) Oct 11, 2018
@t-b
Copy link

t-b commented Oct 11, 2018

@rcdailey yeep, same as #1820.

Workaround:

git submodule update --checkout --force

@rcdailey rcdailey changed the title Built-in rebase fails with 'Unexpected stash response' (MCVE included) Built-in rebase fails with 'Unexpected stash response' (MVCE included) Oct 11, 2018
@rcdailey

This comment was marked as abuse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants