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

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

 



Hi Sangeeta

On 20/10/2020 19:10, Sangeeta NB wrote:
Hey Phillip,

I think we require your full name on the From line to match the
Signed-off-by line below (c.f.
https://lore.kernel.org/git/xmqqpn5dd5dv.fsf@xxxxxxxxxxxxxxxxxxxxxx)

That is a good summary of the issue that this change addresses, we
normally wrap lines at 72 characters though.

This was sent by gitgitgadget so I am unable to find how I can
customize it. Can you help me with this? Or else I have set the Travis
so should I send another patch using send-email?

When you create the commit message you need to get your editor to wrap the lines with line breaks, how you do this depends on your editor - for emacs you can use fill-paragraph, in vim 'gq' you should be able to google it for your editor.

It would be a good idea to add [Outreachy] to the beginning of the commit subject line as well so people can easily find outreachy related patches on the list (anything inside [] is removed by `git am` when the patch is applied)

This unconditionally overrides diff.ignoreSubmodules, grepping seems to
show that we don't have any tests that test a config value of "none".
There are a few that check "dirty" which we should look at to consider
if they still add value now we've changed the default.

Yes, sorry, noticed it now. I have now added a flag in diff_flags.
Also, do I have to add tests that check whether diff.ignoreSubmodules
is not being overwritten?

I think adding a test that checks diff.ignoreSubmodules=none is respected would be a good idea


       if (diff_no_prefix) {
               options->a_prefix = options->b_prefix = "";
diff --git a/submodule.c b/submodule.c
index b3bb59f066..762298c010 100644
--- a/submodule.c
+++ b/submodule.c
@@ -1678,6 +1678,8 @@ unsigned is_submodule_modified(const char *path, int ignore_untracked)
       strvec_pushl(&cp.args, "status", "--porcelain=2", NULL);
       if (ignore_untracked)
               strvec_push(&cp.args, "-uno");
+     else
+        strvec_push (&cp.args, "--ignore-submodules=none");

We need to do this as a consequence of changing the default for
'--ignore-submodules`, we should think what the consequences are for
other users of `git status` and whether we need to do something similar
there if diff.ignoreSubmodules is not set.


Oh okay. I understood what you said. But I couldn't figure out how to
do that.

I'm not sure if we need to do this or not, I was hoping to get some input from the list

As all the tests of status were passing so I don't think
there might be any issue with this.

Possibly, though I think it is more likely that we're not testing anything that gets broken by this change.


Best Wishes

Phillip

I think we want to keep testing that we get the correct output when
--ignore-submodules=none as well as maybe adding a couple of new tests
that check the default in this file, rather than changing the expected
output.


Thanks, I have added more tests.

Thanks and Regards,
Sangeeta




[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