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

Re: [Outreachy] Introduction

From
PWPhillip Wood <phillip.wood123@gmail.com>
Date
Oct 15, 2020, 13:39 UTC
Message-ID
<95c90e7a-8f4c-32b9-2b0e-9efce2acfb8e@gmail.com>
In-Reply-To
<CAHjREB7xhBWHUCJ+T78i6dDGQr055sMAaYzG4gaQSr0T88cseg@mail.gmail.com>
Hi Sangeeta
On 15/10/2020 11:18, Sangeeta NB wrote:
Show 7 quoted lines
> Hey,
> 
>> I've got a fixup which I'll post after this which gets rid of the global
>> flag and instead uses a flag in struct diff_options.
> 
> Thanks for the patch, I was thinking about something on similar lines
> but couldn't come up with anything.

As we store the config options in default_diff_options and then copy them across at the beginning of repo_setup_diff() we can use a flag in struct diff_options which is set by handle_ignore_submodule_arg() to tell if we need to initialize opts->flags.ignore_untracked_in_submodules in repo_setup_diff()

Show 22 quoted lines
> Also, one thing I observed that when I add a printf statement in
> wt-status.c, something like this:
> 
> --- a/wt-status.c
> +++ b/wt-status.c
> @@ -601,11 +601,11 @@ static void
> wt_status_collect_changes_worktree(struct wt_status *s)
>          rev.diffopt.output_format |= DIFF_FORMAT_CALLBACK;
>          rev.diffopt.flags.dirty_submodules = 1;
>          rev.diffopt.ita_invisible_in_index = 1;
> +       printf("a printf statement\n");
>          if (!s->show_untracked_files)
> 
> then git status shows output:
> 
> sh-3.2$ git status -s -uno --ignore-submodules=none
> a printf statement
>   m submod
> 
> which is what is expected. But when I comment out the printf statement
> it again gives no output. I couldn't understand why this is taking
> place and how can a printf line modify the behavior of git status.

Are you adding the printf and then running t3600? If so then the extra line of output breaks a lot of tests which in turn breaks to setup for the test that was failing so there are uncommitted changes. Unfortunately it is hard to run a subset of tests in a lot the test scripts as there are implicit dependencies between the individual tests them.

Show 6 quoted lines
>> I thinking it would be worth considering if
>> some of them should instead be changed to pass --ignore-submodules=none
>> rather than changing the expected result.
> 
> Ya, that's a good suggestion. Would look at those tests again and see
> if I can pass the --ignore-submodules=none option.

For the diff tests I think we want to test the new default and check that --ignore-submodules=none works. I think for the other tests we probably want to just add --ignore-submodules=none

I'm afraid I'm still no closer to figuring out why that test in t3600 fails
Phillip
> Thanks
> 
Previous: Sangeeta NBNext: Sangeeta NB
Message 13 of 17 in “[Outreachy] Introduction”
  1. Sangeeta NBOct 7, 2020
  2. Phillip WoodOct 8, 2020
  3. Sangeeta NBOct 9, 2020
  4. Phillip WoodOct 9, 2020
  5. Sangeeta NBOct 11, 2020
  6. Phillip WoodOct 12, 2020
  7. Kaartic SivaraamOct 12, 2020
  8. Junio C HamanoOct 12, 2020
  9. Sangeeta NBOct 14, 2020
  10. Phillip WoodOct 15, 2020
  11. fixup! diff: do not show submodule with untracked files as "-dirty"Phillip Wood, Oct 15, 2020
  12. Sangeeta NBOct 15, 2020
  13. Phillip WoodOct 15, 2020
  14. Sangeeta NBOct 15, 2020
  15. Phillip WoodOct 15, 2020
  16. Sangeeta NBOct 16, 2020
  17. Phillip WoodOct 16, 2020

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.