git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/2] fsmonitor: demonstrate that it is not refreshed after discard_index()

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Mar 21, 2019, 12:32 UTC
Message-ID
<nycvar.QRO.7.76.6.1903211329500.41@tvgsbejvaqbjf.bet>
In-Reply-To
<680444e1-d670-607b-e84b-c1eb4355b047@kdbg.org>
Hi Hannes,
On Sat, 16 Mar 2019, Johannes Sixt wrote:
Show 16 quoted lines
> Am 16.03.19 um 10:49 schrieb Johannes Schindelin via GitGitGadget:
> > diff --git a/t/t7519-status-fsmonitor.sh b/t/t7519-status-fsmonitor.sh
> > index 3e0a61db23..918bc323ab 100755
> > --- a/t/t7519-status-fsmonitor.sh
> > +++ b/t/t7519-status-fsmonitor.sh
> > @@ -346,4 +346,14 @@ test_expect_success UNTRACKED_CACHE 'ignore .git changes when invalidating UNTR'
> >  	test_cmp before after
> >  '
> >
> > +test_expect_failure 'discard_index() also discards fsmonitor info' '
> > +	test_when_finished \
> > +		"git config core.monitor .git/hooks/fsmonitor-test" &&
>
> Did you mean
> 		"git config core.fsmonitor ...
> ?
D'oh, yes.
> > +	test_config core.fsmonitor "$TEST_DIRECTORY/t7519/fsmonitor-all" &&
>
> And then, does this not unset core.fsmonitor after the test anyway?

It will unset it, as you point out, not *re-set* it to the value it had before.

But I guess that's par for the course. I am just worried about side effects in our test suite. I run into those all the time, it is not even funny: when a prereq is not met, or when you just want to `--run=<this-one>`, you can't, because it is almost as if more than half of our test cases depend on the output of *some* previous test case.

But you're right, I should not worry so much. After all, I am adding a test case to the *end* of the test script.

Will send out a fixed version soon.

Thanks, Dscho

Show 11 quoted lines
>
> > +	test_might_fail git update-index --refresh &&
> > +	test-tool read-cache --print-and-refresh=tracked 2 >actual &&
> > +	printf "tracked is%s up to date\n" "" " not" >expect &&
> > +	test_cmp expect actual
> > +'
> > +
> >  test_done
>
> -- Hannes
>
Previous: Johannes SixtNext: Johannes Schindelin via GitGitGadget
Message 4 of 17 in “Fix fsmonitor after discard_index()”
  1. 0/2 Fix fsmonitor after discard_index()Johannes Schindelin via GitGitGadget, Mar 16, 2019
  2. 1/2 fsmonitor: demonstrate that it is not refreshed after discard_index()Johannes Schindelin via GitGitGadget, Mar 16, 2019
  3. Johannes SixtMar 16, 2019
  4. Johannes SchindelinMar 21, 2019
  5. 2/2 fsmonitor: force a refresh after the index was discardedJohannes Schindelin via GitGitGadget, Mar 16, 2019
  6. Ævar Arnfjörð BjarmasonMar 18, 2019
  7. Johannes SchindelinMar 21, 2019
  8. Johannes SchindelinMay 23, 2019
  9. 0/2 Fix fsmonitor after discard_index()Johannes Schindelin via GitGitGadget, Mar 21, 2019
  10. 1/2 fsmonitor: demonstrate that it is not refreshed after discard_index()Johannes Schindelin via GitGitGadget, Mar 21, 2019
  11. 2/2 fsmonitor: force a refresh after the index was discardedJohannes Schindelin via GitGitGadget, Mar 21, 2019
  12. SZEDER GáborMar 22, 2019
  13. 0/2 Fix fsmonitor after discard_index()Ævar Arnfjörð Bjarmason, May 7, 2019
  14. Junio C HamanoMay 7, 2019
  15. Junio C HamanoMay 8, 2019
  16. 1/2 fsmonitor: demonstrate that it is not refreshed after discard_index()Ævar Arnfjörð Bjarmason, May 7, 2019
  17. 2/2 fsmonitor: force a refresh after the index was discardedÆvar Arnfjörð Bjarmason, May 7, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.