New test: conflicting push in dirty worktree
authorKarl Hasselström <kha@treskal.com>
Thu, 20 Mar 2008 23:12:11 +0000 (23:12 +0000)
committerCatalin Marinas <catalin.marinas@gmail.com>
Thu, 20 Mar 2008 23:12:11 +0000 (23:12 +0000)
commit923309140a6f091df9ed7120d7c818586c980c86
tree9d78891134e39f3080e9298f74b750823ab2c7e3
parent4fe3436ba426814d6682f585226961d29475b65e
New test: conflicting push in dirty worktree

When the result of a conflicting push can't be represented in the
worktree because the worktree is dirty, the push should be aborted.
Similarly, the push should be aborted if we have to do the merge in
the worktree, but can't because the worktree is dirty.

Add a new test that tests for this. It currently fails, in a bad way:
the contents of the pushed patch is lost.

(The test uses goto instead of push, because push doesn't use the new
infrastructure yet. And old-infrastructure commands never have this
bug, because they refuse to run with a dirty worktree.)

This bug was found by Erik Sandberg <mandolaerik@gmail.com>, who also
came up with the minimal test case that I turned into this new test.

Signed-off-by: Karl Hasselström <kha@treskal.com>
t/t3000-dirty-merge.sh [new file with mode: 0755]