sha1-file.c: mark more strings for translation
[gitweb.git] / t / t1001-read-tree-m-2way.sh
index 7b7008970565931fa9f493af74b18e15354668d9..1057a96b2498d1a8abf87f21f90d108eee2c2f96 100755 (executable)
@@ -30,7 +30,7 @@ read_tree_twoway () {
 compare_change () {
        sed -n >current \
            -e '/^--- /d; /^+++ /d; /^@@ /d;' \
-           -e 's/^\([-+][0-7][0-7][0-7][0-7][0-7][0-7]\) '"$_x40"' /\1 X /p' \
+           -e 's/^\([-+][0-7][0-7][0-7][0-7][0-7][0-7]\) '"$OID_REGEX"' /\1 X /p' \
            "$1"
        test_cmp expected current
 }
@@ -363,6 +363,14 @@ test_expect_success 'a/b (untracked) vs a, plus c/d case test.' '
        test -f a/b
 '
 
+test_expect_success 'read-tree supports the super-prefix' '
+       cat <<-EOF >expect &&
+               error: Updating '\''fictional/a'\'' would lose untracked files in it
+       EOF
+       test_must_fail git --super-prefix fictional/ read-tree -u -m "$treeH" "$treeM" 2>actual &&
+       test_cmp expect actual
+'
+
 test_expect_success 'a/b vs a, plus c/d case setup.' '
        rm -f .git/index &&
        rm -fr a &&