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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sangeeta <sangunb09@xxxxxxxxx> writes:

>> > 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.





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux