Re: [PATCH] range-diff: allow to diff files regardless submodule
- From
- Lucas De Marchi <lucas.de.marchi@gmail.com>
- Date
- Oct 11, 2018, 07:50 UTC
- Message-ID
- <CAKi4VALL5nnLfo4ZxtifKE1JmcmUQ6F-9GSAQEMxXLjKsCtSmg@mail.gmail.com>
- In-Reply-To
- <20181011000233.GX432229@genre.crustytoothpaste.net>
On Wed, Oct 10, 2018 at 5:02 PM brian m. carlson <sandals@crustytoothpaste.net> wrote:
Show 29 quoted lines
>
> On Wed, Oct 10, 2018 at 08:09:16AM -0700, Lucas De Marchi wrote:
> > Do like it's done in grep so mode doesn't end up as
> > 0160000, which means range-diff doesn't work if one has
> > "submodule.diff = log" in the configuration. Without this
> > while using range-diff I only get a
> >
> > Submodule a 0000000...0000000 (new submodule)
> >
> > instead of the diff between the revisions.
> >
> > Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
> > ---
> > range-diff.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/range-diff.c b/range-diff.c
> > index 60edb2f518..bd8083f2d1 100644
> > --- a/range-diff.c
> > +++ b/range-diff.c
> > @@ -354,7 +354,7 @@ static struct diff_filespec *get_filespec(const char *name, const char *p)
> > {
> > struct diff_filespec *spec = alloc_filespec(name);
> >
> > - fill_filespec(spec, &null_oid, 0, 0644);
> > + fill_filespec(spec, &null_oid, 0, 0100644);
>
> If we have a system that has different mode values from the common Unix
> ones, is this still correct or does it need to change?From what I can see this would still be correct, or at least git-grep implementation would be broken.
Lucas De Marchi
> -- > brian m. carlson: Houston, Texas, US > OpenPGP: https://keybase.io/bk2204
-- Lucas De Marchi