Bug #9311 reported in the past for a push conflict with an unrecorded
file. It is no longer reproducible but test added for future
regression.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
[ "$(echo $(stg status --conflict))" = "foo/y.txt x.txt" ]
'
[ "$(echo $(stg status --conflict))" = "foo/y.txt x.txt" ]
'
+test_expect_success 'Conflicting add/unknown file in subdir' '
+ stg status --reset &&
+ stg new foo -m foo &&
+ mkdir d &&
+ echo foo > d/test &&
+ stg add d/test &&
+ stg refresh &&
+ stg pop &&
+ mkdir -p d &&
+ echo bar > d/test &&
+ ! stg push foo &&
+ [ $(stg top) != "foo" ]
+'
+