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

Re: [Outreachy][PATCH v6] diff: do not show submodule with untracked files as "-dirty"

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 9, 2020, 17:01 UTC
Message-ID
<xmqqr1p2cvll.fsf@gitster.c.googlers.com>
In-Reply-To
<CAHjREB4=ESipt0r00WmueTH8h+2zQxLjJhky72M6dF-EX3WafQ@mail.gmail.com>
Sangeeta <sangunb09@gmail.com> writes:
Show 19 quoted lines
>> > diff --git a/t/t3701-add-interactive.sh b/t/t3701-add-interactive.sh
>> > index ca04fac417..9104d1946d 100755
>> > --- a/t/t3701-add-interactive.sh
>> > +++ b/t/t3701-add-interactive.sh
>> > @@ -765,6 +765,11 @@ test_expect_success 'setup different kinds of dirty submodules' '
>> >       cat >expected <<-\EOF &&
>> >       dirty-both-ways
>> >       dirty-head
>> > +     EOF
>> > +     git -C for-submodules diff-files --name-only --ignore-submodules=none >actual &&
>> > +     cat >expected <<-\EOF &&
>> > +     dirty-both-ways
>> > +     dirty-head
>>
>> This will throw-away above change to "expected", I think this is not
>> what you expected to write!
>
> I am sorry I couldn't understand what you mean by that. I think that
> is what I expected to write. I want those changes to be in "expected".
Looking at the above quoted part again...
	cat >expected <<-\EOF &&
		... content 1 ...
	EOF
        git ... >actual &&
	cat >expected <<-\EOF &&
		... content 2 ...
	EOF

I think Đoàn Trần Công Danh wants to say is that expected originally has content 1, and that is discarded because you overwrite the same file with content 2. So either

 - if content1 and content2 are identical, perhaps you do not have
   to write content2 into expected at all, or
 - if content1 and content2 are different, perhaps you forgot to
   consume content1 before overwriting it.

THe latter is quite plausible, as the original test without your addition must be consuming content1 after the part you added.

Previous: SangeetaNext: Sangeeta Jain
Message 32 of 36 in “diff: do not show submodule with untracked files as "-dirty"”
  1. diff: do not show submodule with untracked files as "-dirty"Sangeeta via GitGitGadget, Oct 15, 2020
  2. Phillip WoodOct 20, 2020
  3. Sangeeta NBOct 20, 2020
  4. Phillip WoodOct 21, 2020
  5. [Outreachy] [PATCH v2] diff: do not show submodule with untracked files as "-dirty"Sangeeta Jain, Oct 21, 2020
  6. Eric SunshineOct 21, 2020
  7. Sangeeta NBOct 21, 2020
  8. Eric SunshineOct 21, 2020
  9. [Outreachy] [PATCH v3] diff: do not show submodule with untracked files as "-dirty"Sangeeta Jain, Oct 22, 2020
  10. Junio C HamanoOct 22, 2020
  11. Sangeeta NBOct 23, 2020
  12. Junio C HamanoOct 23, 2020
  13. Sangeeta NBOct 23, 2020
  14. Junio C HamanoOct 23, 2020
  15. Sangeeta NBOct 23, 2020
  16. diff: do not show submodule with untracked files as "-dirty"Sangeeta Jain, Oct 23, 2020
  17. Junio C HamanoOct 23, 2020
  18. Sangeeta NBOct 23, 2020
  19. Junio C HamanoOct 23, 2020
  20. [Outreachy] [PATCH v4] diff: do not show submodule with untracked files as "-dirty"Sangeeta Jain, Oct 23, 2020
  21. Junio C HamanoOct 23, 2020
  22. Sangeeta NBOct 25, 2020
  23. Junio C HamanoOct 26, 2020
  24. [Outreachy] [PATCH v5] diff: do not show submodule with untracked files as "-dirty"Sangeeta Jain, Oct 23, 2020
  25. [Outreachy][PATCH v6] diff: do not show submodule with untracked files as "-dirty"Sangeeta Jain, Oct 26, 2020
  26. SangeetaNov 3, 2020
  27. Junio C HamanoNov 3, 2020
  28. SangeetaNov 7, 2020
  29. Junio C HamanoDec 8, 2020
  30. Đoàn Trần Công DanhNov 7, 2020
  31. SangeetaNov 9, 2020
  32. Junio C HamanoNov 9, 2020
  33. [Outreachy][PATCH v7] diff: do not show submodule with untracked files as "-dirty"Sangeeta Jain, Nov 10, 2020
  34. Đoàn Trần Công DanhNov 10, 2020
  35. SangeetaDec 8, 2020
  36. Junio C HamanoDec 8, 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.