Thread (101 messages) flat view 101 messages, 9 authors, 2021-11-02

Re: [PATCH v2 02/14] t1092: behavior for adding sparse files

From: Derrick Stolee <hidden>
Date: 2021-09-13 15:41:02

On 9/12/2021 6:17 PM, Ævar Arnfjörð Bjarmason wrote:
On Sun, Sep 12 2021, Derrick Stolee via GitGitGadget wrote:
quoted
+# NEEDSWORK: This documents current behavior, but is not a desirable
+# behavior (untracked files are handled differently than tracked).
I wonder if a test_expect_failure test would be better for the thing
that is the desired behavior, but maybe we don't know what the CLI UI
for that would look like yet.
The problem with test_expect_failure is that you don't know which
line of the test is the problem. That's probably all fine and good
when we completely understand the situation we want to solve but
don't have a good approach to fixing it, but here I want to document
a change in behavior.

Using test_expect_success allows me to demonstrate "it works this
way now" and then "this is how behavior changes".
quoted
+test_expect_success 'add outside sparse cone' '
+	init_repos &&
+
+	run_on_sparse mkdir folder1 &&
+	run_on_sparse ../edit-contents folder1/a &&
+	run_on_sparse ../edit-contents folder1/newfile &&
+	test_sparse_match test_must_fail git add folder1/a &&
+	test_i18ngrep "Disable or modify the sparsity rules" sparse-checkout-err &&
Just "grep" is preferred over "test_i18ngrep" now, the GETTEXT_POISON
went away.
Right. Force of habit.

Thanks,
-Stolee
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help